]> 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>
Mon, 26 Nov 2012 11:19:02 +0000 (12:19 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/mountP.h

index f28935d0d06065b4b72ee380e8c070bff42a3d44..04dd077a811d357500625c5bd83fde1d5da94ab9 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);