X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=app%2Fproc_info%2Fmain.c;fp=app%2Fproc_info%2Fmain.c;h=595f79f6a70e00c7739ed98078758a9b700062d7;hb=32e04ea00cd159613e04acef75e52bfca6eeff2f;hp=6dc0bbb8bd8896ea475e5f63c292414b82ef598e;hpb=6cfa4f771efe39dbc944e799cbe465134c8931fa;p=deb_dpdk.git diff --git a/app/proc_info/main.c b/app/proc_info/main.c index 6dc0bbb8..595f79f6 100644 --- a/app/proc_info/main.c +++ b/app/proc_info/main.c @@ -268,7 +268,7 @@ nic_xstats_display(uint8_t port_id) if (len != rte_eth_xstats_get_names( port_id, xstats_names, len)) { printf("Cannot get xstat names\n"); - return; + goto err; } printf("###### NIC extended statistics for port %-2d #########\n", @@ -278,8 +278,7 @@ nic_xstats_display(uint8_t port_id) ret = rte_eth_xstats_get(port_id, xstats, len); if (ret < 0 || ret > len) { printf("Cannot get xstats\n"); - free(xstats); - return; + goto err; } for (i = 0; i < len; i++) @@ -289,6 +288,7 @@ nic_xstats_display(uint8_t port_id) printf("%s############################\n", nic_stats_border); +err: free(xstats); free(xstats_names); }