ipc: mqueue: fix possible memory leak in init_mqueue_fs()

A fix for a unlikely but possible memory leak.

Hangyu Hua (1):
      ipc: mqueue: fix possible memory leak in init_mqueue_fs()

 ipc/mqueue.c | 1 +
 1 file changed, 1 insertion(+)
ipc: mqueue: fix possible memory leak in init_mqueue_fs()

commit db7cfc380900 ("ipc: Free mq_sysctls if ipc namespace creation
failed")

Here's a similar memory leak to the one fixed by the patch above.
retire_mq_sysctls need to be called when init_mqueue_fs fails after
setup_mq_sysctls.

Fixes: dc55e35f9e81 ("ipc: Store mqueue sysctls in the ipc namespace")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lkml.kernel.org/r/20220715062301.19311-1-hbh25y@gmail.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
1 file changed