Skip to content

Commit 597a421

Browse files
elfringamschuma-ntap
authored andcommitted
rpc_pipefs: Replace one label in bl_resolve_deviceid()
The kfree() function was called in one case by the bl_resolve_deviceid() function during error handling even if the passed data structure member contained a null pointer. This issue was detected by using the Coccinelle software. Thus use an other label. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 12fc0a9 commit 597a421

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/blocklayout/rpc_pipefs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ bl_resolve_deviceid(struct nfs_server *server, struct pnfs_block_volume *b,
7575
msg->len = sizeof(*bl_msg) + b->simple.len;
7676
msg->data = kzalloc(msg->len, gfp_mask);
7777
if (!msg->data)
78-
goto out_free_data;
78+
goto out_unlock;
7979

8080
bl_msg = msg->data;
8181
bl_msg->type = BL_DEVICE_MOUNT;

0 commit comments

Comments
 (0)