]> err.no Git - util-linux/commitdiff
hwclock: fix mismatched popen/fclose.
authorJohn Keeping <john.keeping@lineone.net>
Mon, 25 May 2009 11:24:46 +0000 (12:24 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 27 May 2009 20:59:25 +0000 (22:59 +0200)
date_child_fp is opened by popen, so should be closed with pclose.

Signed-off-by: John Keeping <john.keeping@lineone.net>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
hwclock/hwclock.c

index 11c606ddfdc0b11cb7abdf0b0c18bed11afe9afe..571d63fb7edbb1f27cff689549c60baed0d8f77d 100644 (file)
@@ -676,7 +676,7 @@ interpret_date_string(const char *date_opt, time_t * const time_p) {
                                       date_opt, (long) *time_p);
                }
        }
-       fclose(date_child_fp);
+       pclose(date_child_fp);
 
        return retcode;
 }