From: Michael Tremer Date: Tue, 6 Feb 2018 11:46:56 +0000 (+0000) Subject: network-phy-list-ht-caps: Fix SEGV when no PHY was found X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39e3ca3b9b25823d5c03b3db9928962e3804b21e;p=people%2Fjschlag%2Fnetwork.git network-phy-list-ht-caps: Fix SEGV when no PHY was found Signed-off-by: Michael Tremer --- diff --git a/src/utils/network-phy-list-ht-caps.c b/src/utils/network-phy-list-ht-caps.c index 0b87872..3a6538b 100644 --- a/src/utils/network-phy-list-ht-caps.c +++ b/src/utils/network-phy-list-ht-caps.c @@ -27,6 +27,7 @@ int main(int argc, char** argv) { struct network_ctx* ctx = NULL; + struct network_phy* phy = NULL; int r; if (argc < 2) { @@ -40,7 +41,6 @@ int main(int argc, char** argv) { if (r) return r; - struct network_phy* phy; r = network_phy_new(ctx, &phy, argv[1]); if (r) { fprintf(stderr, "Could not find %s\n", argv[1]);