]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: make debug stuff more robust
authorKarel Zak <kzak@redhat.com>
Mon, 26 Nov 2012 11:19:02 +0000 (12:19 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 12 Dec 2012 10:12:09 +0000 (11:12 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/mountP.h

index bbaa2c6c4d484adc072c31bcbbd90db3f8dd61fc..48d14334f3a3e29a8956ef36285cc67e141219c4 100644 (file)
@@ -89,7 +89,8 @@ mnt_debug_h(void *handler, const char *mesg, ...)
 {
        va_list ap;
 
-       fprintf(stderr, "[%p]: ", handler);
+       if (handler)
+               fprintf(stderr, "[%p]: ", handler);
        va_start(ap, mesg);
        vfprintf(stderr, mesg, ap);
        va_end(ap);