r283: Don't dereference a command if it's empty
authoryoe <yoe>
Tue, 18 Sep 2007 12:32:20 +0000 (12:32 +0000)
committeryoe <yoe>
Tue, 18 Sep 2007 12:32:20 +0000 (12:32 +0000)
nbd-server.c

index b3e5e61..d7109c6 100644 (file)
@@ -1259,7 +1259,7 @@ int do_run(gchar* command, gchar* file) {
        gchar* cmd;
        int retval=0;
 
-       if(*command) {
+       if(command && *command) {
                cmd = g_strdup_printf(command, file);
                retval=system(cmd);
                g_free(cmd);