Skip to content

Commit 68d2059

Browse files
Colin Ian Kingjgross1
authored andcommitted
xen/pvcalls: fix null pointer dereference on map->sock
Currently if map is null then a potential null pointer deference occurs when calling sock_release on map->sock. I believe the actual intention was to call sock_release on sock instead. Fix this. Fixes: 5db4d28 ("xen/pvcalls: implement connect command") Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Juergen Gross <[email protected]>
1 parent d1a75e0 commit 68d2059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/pvcalls-back.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static int pvcalls_back_connect(struct xenbus_device *dev,
416416
sock);
417417
if (!map) {
418418
ret = -EFAULT;
419-
sock_release(map->sock);
419+
sock_release(sock);
420420
}
421421

422422
out:

0 commit comments

Comments
 (0)