Segfault bugfix thanks to Oliver Metz.
authorClemens Fruhwirth <clemens@endorphin.org>
Wed, 1 Apr 2009 20:36:35 +0000 (20:36 +0000)
committerClemens Fruhwirth <clemens@endorphin.org>
Wed, 1 Apr 2009 20:36:35 +0000 (20:36 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@48 36d66b0a-2a48-0410-832c-cd162a569da5

lib/utils.c

index 6566a08..8bffc50 100644 (file)
@@ -32,7 +32,9 @@ void set_error_va(const char *fmt, va_list va)
            error=NULL;
        }
 
-        vasprintf(&error, fmt, va);
+       if(!fmt) return;
+
+       vasprintf(&error, fmt, va);
 }
 
 void set_error(const char *fmt, ...)