]> jfr.im git - irc/blitzed-org/bopm.git/commitdiff
src/main.c:
authorandy <redacted>
Mon, 27 May 2002 12:08:38 +0000 (12:08 +0000)
committerandy <redacted>
Mon, 27 May 2002 12:08:38 +0000 (12:08 +0000)
Only fclose() if we managed to fopen().

src/main.c

index f1c3e09aee1c1f0fe639972f5bb8424479bfd6b9..2a4735039301d236c5ff5b46bda20e963a0540c4 100644 (file)
@@ -142,10 +142,9 @@ int main(int argc, char **argv)
 
        if (pidout) {
                fwrite(spid, sizeof(char), strlen(spid), pidout);
+               fclose(pidout);
        }
 
-       fclose(pidout);
-
        /* Setup alarm & int handlers. */
  
        ALARMACTION.sa_handler = &(do_signal);