Bob Copeland
92ca4f92ec
mwifiex: fix error handling in mwifiex_create_custom_regdomain
...
smatch reports:
sta_cmdresp.c:1053 mwifiex_create_custom_regdomain() warn: possible memory leak of 'regd'
Indeed, mwifiex_create_custom_regdomain() returns NULL in the
case that channel is missing in the TLV without freeing regd.
Moreover, some other error paths in this function return ERR_PTR
values which are assigned without checking to the regd field in
the mwifiex_adapter struct. The latter is only null-checked where
used.
Fix by freeing regd in the error path, and only update
priv->adapter->regd if the returned pointer is valid.
Cc: Amitkumar Karwar <akarwar@marvell.com >
Cc: Nishant Sarmukadam <nishants@marvell.com >
Signed-off-by: Bob Copeland <me@bobcopeland.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2016-09-17 18:25:57 +03:00
..
2016-09-10 09:58:52 -07:00
2016-08-18 17:21:37 +02:00
2016-08-30 11:59:47 -04:00
2016-09-15 19:15:55 -04:00
2016-09-06 11:02:36 -07:00
2016-09-09 12:00:37 +03:00
2016-08-25 08:56:51 -06:00
2016-07-18 10:13:02 +02:00
2016-09-07 21:24:42 -07:00
2016-07-12 08:24:50 -07:00
2016-09-09 14:52:05 -07:00
2016-08-29 17:08:35 -07:00
2016-08-29 09:51:39 +02:00
2016-07-05 11:40:47 -07:00
2016-08-31 02:49:05 +02:00
2016-07-30 21:01:36 -07:00
2016-09-12 15:52:44 -07:00
2016-09-03 10:40:57 -07:00
2016-07-06 13:11:24 +09:00
2016-08-22 11:57:49 +05:30
2016-07-18 14:10:49 +02:00
2016-08-21 10:58:34 -07:00
2016-07-02 14:31:34 +09:00
2016-09-08 12:19:24 -07:00
2016-08-04 08:50:07 -04:00
2016-09-08 00:42:57 +02:00
2016-09-02 15:55:15 +10:00
2016-07-28 10:49:23 +02:00
2016-06-28 00:40:08 +02:00
2016-08-29 05:31:31 -07:00
2016-07-06 12:20:34 -07:00
2016-07-29 13:55:30 -07:00
2016-09-08 22:50:33 +02:00
2016-07-29 13:29:06 -07:00
2016-07-30 12:56:26 -07:00
2016-09-09 13:44:37 +02:00
2016-09-15 20:49:20 -04:00
2016-08-26 18:36:23 -07:00
2016-08-22 12:33:56 +02:00
2016-08-22 18:37:51 +02:00
2016-09-01 23:36:17 -07:00
2016-07-30 21:01:36 -07:00
2016-07-20 17:37:01 -06:00
2016-08-22 11:09:33 +10:00
2016-08-29 18:43:39 +05:30
2016-09-03 17:29:58 -07:00
2016-08-04 09:59:37 -04:00
2016-08-08 11:18:40 +03:00
2016-08-02 17:31:41 -04:00
2016-08-01 18:36:01 -04:00
2016-09-06 12:17:30 -07:00
2016-08-25 14:11:43 -06:00
2016-08-04 19:51:49 -04:00
2016-09-17 18:25:57 +03:00
2016-07-20 23:39:36 -07:00
2016-08-05 10:34:13 -04:00
2016-09-09 17:34:46 -07:00
2016-09-11 14:41:49 -07:00
2016-08-15 11:15:05 -05:00
2016-08-04 08:50:07 -04:00
2016-09-03 11:38:43 -07:00
2016-09-02 17:17:52 +01:00
2016-08-12 14:59:10 +05:30
2016-08-23 12:28:31 +02:00
2016-08-28 22:31:52 -07:00
2016-07-27 18:52:54 +02:00
2016-08-15 23:10:44 +02:00
2016-07-23 10:25:54 +09:00
2016-09-06 16:57:02 -07:00
2016-08-06 00:01:33 -04:00
2016-09-01 17:52:02 -07:00
2016-09-06 12:31:34 +01:00
2016-08-04 08:50:07 -04:00
2016-06-29 23:39:10 +02:00
2016-08-05 09:48:22 -04:00
2016-08-16 15:50:22 -07:00
2016-09-06 11:06:52 -07:00
2016-08-01 18:36:01 -04:00
2016-09-06 12:32:09 +01:00
2016-07-06 15:09:36 +02:00
2016-09-12 15:52:44 -07:00
2016-09-15 20:49:20 -04:00
2016-09-06 20:46:06 +08:00
2016-08-31 13:25:02 +02:00
2016-08-31 16:28:26 +02:00
2016-09-09 15:11:35 +02:00
2016-08-08 16:16:23 -06:00
2016-08-23 17:16:57 +03:00
2016-08-04 08:50:07 -04:00
2016-09-09 21:12:35 +03:00
2016-08-02 19:35:40 -04:00
2016-07-27 10:47:43 +02:00
2016-08-24 18:16:18 +01:00
2016-08-06 09:20:13 -04:00