git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
devargs: fix null dereferencing on failure
[dpdk.git]
/
lib
/
librte_eal
/
common
/
eal_common_devargs.c
diff --git
a/lib/librte_eal/common/eal_common_devargs.c
b/lib/librte_eal/common/eal_common_devargs.c
index
9b110f7
..
615945e
100644
(file)
--- a/
lib/librte_eal/common/eal_common_devargs.c
+++ b/
lib/librte_eal/common/eal_common_devargs.c
@@
-124,12
+124,13
@@
rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str)
return 0;
fail:
- if (devargs->args)
- free(devargs->args);
if (buf)
free(buf);
- if (devargs)
+ if (devargs) {
+ free(devargs->args);
free(devargs);
+ }
+
return -1;
}