From: Markus Elfring Date: Fri, 29 Dec 2023 12:18:56 +0000 (+0100) Subject: rpc_pipefs: Replace one label in bl_resolve_deviceid() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=597a421798033cd150586b5f2607389fa4052550;p=users%2Fjedix%2Flinux-maple.git 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 Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c index 6c977288cc288..d8d50a88de04f 100644 --- a/fs/nfs/blocklayout/rpc_pipefs.c +++ b/fs/nfs/blocklayout/rpc_pipefs.c @@ -75,7 +75,7 @@ bl_resolve_deviceid(struct nfs_server *server, struct pnfs_block_volume *b, msg->len = sizeof(*bl_msg) + b->simple.len; msg->data = kzalloc(msg->len, gfp_mask); if (!msg->data) - goto out_free_data; + goto out_unlock; bl_msg = msg->data; bl_msg->type = BL_DEVICE_MOUNT;