Wenwen Wang
0ba69e96cc
test_firmware: fix a memory leak bug
...
[ Upstream commit d4fddac5a51c378c5d3e68658816c37132611e1f ]
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 >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2019-08-16 10:12:49 +02:00
..
2018-08-23 18:48:43 -07:00
2019-07-10 09:53:42 +02:00
2019-04-05 22:33:08 +02:00
2019-07-26 09:14:12 +02:00
2018-10-02 08:44:59 +10:00
2018-03-26 02:01:27 +09:00
2018-08-22 10:52:48 -07:00
2018-06-12 16:19:22 -07:00
2017-12-08 15:13:27 +00:00
2019-03-23 20:09:48 +01:00
2018-06-21 14:25:21 +02:00
2018-10-12 09:17:46 +02:00
2018-08-22 10:52:48 -07:00
2019-04-05 22:33:08 +02:00
2018-03-14 16:55:29 -07:00
2018-08-16 12:14:42 -07:00
2018-03-09 16:40:01 -08:00
2018-01-12 23:03:01 +11:00
2018-02-06 18:32:44 -08:00
2018-07-27 19:04:33 +08:00
2018-07-27 19:04:33 +08:00
2018-08-22 10:52:48 -07:00
2018-01-08 10:08:33 +00:00
2018-11-13 11:08:20 -08:00
2018-12-17 09:24:41 +01:00
2018-06-12 23:33:24 +02:00
2018-07-27 19:16:38 +08:00
2018-07-23 15:22:39 +10:00
2019-04-20 09:16:05 +02:00
2018-03-15 13:25:36 +01:00
2019-06-04 08:02:34 +02:00
2018-01-12 17:33:38 -08:00
2018-04-27 08:51:26 -04:00
2018-05-11 17:28:45 -07:00
2018-02-06 18:32:44 -08:00
2018-07-27 19:04:33 +08:00
2018-08-22 10:52:48 -07:00
2018-08-21 23:54:21 -04:00
2019-01-22 21:40:34 +01:00
2018-06-12 16:19:22 -07:00
2018-05-09 06:55:44 +02:00
2018-07-04 21:37:08 +02:00
2019-05-22 07:37:45 +02:00
2018-08-22 10:52:48 -07:00
2019-05-02 09:58:53 +02:00
2018-07-26 19:38:03 -07:00
2018-08-10 20:19:58 -07:00
2018-06-12 16:19:22 -07:00
2018-07-02 16:20:23 -04:00
2019-05-31 06:46:28 -07:00
2018-08-18 11:44:53 -07:00
2018-03-26 15:09:38 +02:00
2018-04-11 10:28:35 -07:00
2018-07-03 09:44:36 +02:00
2018-04-12 09:41:19 -07:00
2018-03-21 17:18:34 -05:00
2018-06-12 16:19:22 -07:00
2019-05-25 18:23:45 +02:00
2018-06-28 16:18:04 +09:00
2018-07-09 14:10:40 +02:00
2017-12-08 15:13:28 +00:00
2018-01-26 11:45:16 -06:00
2018-08-30 12:56:40 +02:00
2018-03-19 10:09:44 -07:00
2018-08-21 23:54:21 -04:00
2018-06-12 16:19:22 -07:00
2017-12-14 16:00:48 -08:00
2018-07-07 01:45:31 +02:00
2018-07-17 09:27:43 +02:00
2019-04-03 06:26:17 +02:00
2019-05-31 06:46:00 -07:00
2019-07-26 09:14:23 +02:00
2019-02-12 19:47:16 +01:00
2018-04-13 17:10:28 -07:00
2018-01-05 15:24:00 +01:00
2018-02-06 18:32:44 -08:00
2019-04-17 08:38:45 +02:00
2019-05-31 06:46:16 -07:00
2019-05-31 06:46:16 -07:00
2018-06-27 18:58:49 +03:00
2018-05-18 17:17:12 -07:00
2018-06-28 23:58:39 +02:00
2019-01-13 09:51:10 +01:00
2019-08-16 10:12:49 +02:00
2018-12-08 12:59:06 +01:00
2018-10-15 16:31:29 -04:00
2018-04-11 10:28:32 -07:00
2019-03-13 14:02:32 -07:00
2019-08-06 19:06:51 +02:00
2018-06-25 13:44:20 +02:00
2019-02-12 19:47:21 +01:00
2018-02-06 18:32:45 -08:00
2019-08-06 19:06:51 +02:00
2018-04-11 10:28:35 -07:00
2018-03-26 15:55:57 +02:00
2018-04-16 18:53:13 -04:00
2017-12-29 23:13:10 +01:00
2019-05-10 17:54:04 +02:00
2018-02-06 18:32:46 -08:00
2018-04-23 16:39:35 +01:00
2018-06-07 17:34:39 -07:00
2017-12-11 09:35:11 -05:00
2017-12-11 15:03:08 -07:00
2018-10-05 10:17:15 -04:00