mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
client: check NULL return for DPP cmd_show
If the DPP interface goes away this could return NULL which was unchecked. Caught by static analysis.
This commit is contained in:
parent
3ccaf7beed
commit
da8a87fcf5
@ -284,6 +284,11 @@ static enum cmd_status cmd_show(const char *device_name,
|
|||||||
device_proxy_find(device_name, IWD_DPP_INTERFACE);
|
device_proxy_find(device_name, IWD_DPP_INTERFACE);
|
||||||
char *caption = l_strdup_printf("%s: %s", "DPP", device_name);
|
char *caption = l_strdup_printf("%s: %s", "DPP", device_name);
|
||||||
|
|
||||||
|
if (!proxy) {
|
||||||
|
display("No DPP interface on device: '%s'\n", device_name);
|
||||||
|
return CMD_STATUS_INVALID_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
proxy_properties_display(proxy, caption, MARGIN, 20, 47);
|
proxy_properties_display(proxy, caption, MARGIN, 20, 47);
|
||||||
l_free(caption);
|
l_free(caption);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user