This was found by smatch (http://repo.or.cz/w/smatch.git/)

regards,
dan carpenter

Signed-off-by: Dan Carpenter <[email protected]>
--- orig/fs/btrfs/async-thread.c        2009-03-26 16:36:46.000000000 +0300
+++ devel/fs/btrfs/async-thread.c       2009-03-26 16:39:08.000000000 +0300
@@ -278,8 +278,8 @@
                                           workers->num_workers + i);
                worker->workers = workers;
                if (IS_ERR(worker->task)) {
-                       kfree(worker);
                        ret = PTR_ERR(worker->task);
+                       kfree(worker);
                        goto fail;
                }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to