Staging: pohmelfs: avoid null dereference
authorDan Carpenter <error27@gmail.com>
Fri, 8 Jan 2010 11:51:50 +0000 (14:51 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:40 +0000 (16:42 -0800)
err_out_put is for when the netfs_trans_alloc() succeeded.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/pohmelfs/inode.c

index e286fd1..6a978c8 100644 (file)
@@ -322,7 +322,7 @@ int pohmelfs_write_create_inode(struct pohmelfs_inode *pi)
        t = netfs_trans_alloc(psb, err + 1, 0, 0);
        if (!t) {
                err = -ENOMEM;
-               goto err_out_put;
+               goto err_out_exit;
        }
        t->complete = pohmelfs_write_inode_complete;
        t->private = igrab(inode);