vdev: free reply.msgs memory for secondary process
PATCH 1/1 vdev: free reply.msgs memory for secondary process
This patch fixes an issue caught with ASAN where a vdev_scan() to a secondary bus was failing to free some memory.
Signed-off-by paul luse <[email protected]>
--- drivers/bus/vdev/vdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/bus/vdev/vdev.c +1 -0
@@ -423,6 +423,7 @@ vdev_scan(void) mp_rep = &mp_reply.msgs[0 ]; resp = (struct vdev_param *)mp_rep->param;VDEV_LOG (INFO ,"Received %d vdevs" , resp->num); +free (mp_reply.msgs); }else VDEV_LOG (ERR ,"Failed to request vdev from primary" );
Signature · 1 line
2.17.1 (Apple Git-112)
Quoted 14 lines · paul luse
This patch fixes an issue caught with ASAN where a
vdev_scan()to a secondary bus was failing to free some memory.Signed-off-by paul luse <[email protected]>--- drivers/bus/vdev/vdev.c | 1 + 1 file changed, 1 insertion(+)drivers/bus/vdev/vdev.c +0
-0
drivers/bus/vdev/vdev.c vdev_scan(void) · line 429
Quoted 7 lines
drivers/bus/vdev/vdev.c +1
-0@@ -423,6 +423,7 @@ vdev_scan(void) mp_rep = &mp_reply.msgs[0 ]; resp = (struct vdev_param *)mp_rep->param;VDEV_LOG (INFO ,"Received %d vdevs" , resp->num); +free (mp_reply.msgs); }else VDEV_LOG (ERR ,"Failed to request vdev from primary" );
Acked-by Anatoly Burakov <[email protected]>
Signature · 2 lines
Thanks, Anatoly