Wenwen Wang d4fddac5a5 test_firmware: fix a memory leak bug
In test_firmware_init(), the buffer pointed to by the global pointer
'test_fw_config' is allocated through kzalloc(). Then, the buffer is
initialized in __test_firmware_config_init(). In the case that the
initialization fails, the following execution in test_firmware_init() needs
to be terminated with an error code returned to indicate this failure.
However, the allocated buffer is not freed on this execution path, leading
to a memory leak bug.

To fix the above issue, free the allocated buffer before returning from
test_firmware_init().

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Link: https://lore.kernel.org/r/1563084696-6865-1-git-send-email-wang6495@umn.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25 14:39:52 +02:00
..
2019-07-12 16:03:16 -07:00
2018-08-22 10:52:48 -07:00
2018-10-12 09:17:46 +02:00
2018-08-16 12:14:42 -07:00
2018-08-22 10:52:48 -07:00
2014-04-30 19:49:37 +01:00
2019-07-12 15:13:55 -07:00
2019-03-12 10:04:02 -07:00
2017-02-24 17:46:57 -08:00
2019-07-19 17:13:56 -07:00
2019-07-20 09:34:55 -07:00
2019-07-19 17:13:56 -07:00
2018-10-16 13:45:44 +02:00
2019-07-01 11:57:12 -06:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:17:41 -07:00
2018-06-27 18:58:49 +03:00
2018-10-15 16:31:29 -04:00
2019-06-02 23:00:24 -04:00
2019-05-06 11:12:09 -07:00
2019-07-09 12:25:58 -07:00
2017-08-15 09:02:07 -07:00