btrfs-progs: cleanup unnecessary free if malloc fails in btrfs-image
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>
Thu, 26 Jun 2014 02:53:03 +0000 (10:53 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 22 Aug 2014 12:43:12 +0000 (14:43 +0200)
Don't bother free the buffer if the malloc failed.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
btrfs-image.c

index c1af019..03cf85e 100644 (file)
@@ -1632,7 +1632,7 @@ static void *restore_worker(void *data)
                if (!mdres->error)
                        mdres->error = -ENOMEM;
                pthread_mutex_unlock(&mdres->mutex);
-               goto out;
+               pthread_exit(NULL);
        }
 
        while (1) {