Don't bother free the buffer if the malloc failed.

Signed-off-by: Gui Hecheng <guihc.f...@cn.fujitsu.com>
---
 btrfs-image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-image.c b/btrfs-image.c
index 7131001..2d482c3 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -1631,7 +1631,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) {
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to