]> Zhao Yanbai Git Server - minix.git/commitdiff
fp might be NULL.
authorBen Gras <ben@minix3.org>
Mon, 21 Sep 2009 15:23:08 +0000 (15:23 +0000)
committerBen Gras <ben@minix3.org>
Mon, 21 Sep 2009 15:23:08 +0000 (15:23 +0000)
test/ipc/semget/semget05.c

index 1c6b6108cb11fe62ccd5dceee2903bbd1a6f205f..4b7e37419a0b70e3ca74743f495bb706ba29c35b 100644 (file)
@@ -95,7 +95,8 @@ int main(int ac, char **av)
              }
 
          }
-       fclose(fp);
+       if(fp) 
+               fclose(fp);
 
        sem_id_arr = (int*)malloc(sizeof(int)*MAXIDS);