btrfs-progs: cleanup unnecessary free if malloc fails in btrfs-image

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>
This commit is contained in:
Gui Hecheng 2014-06-26 10:53:03 +08:00 committed by David Sterba
parent 5e94319406
commit 3c1a246393

View 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) {