DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: Fix wrong error checking of rte_eal_parse_devargs_str()
@ 2016-06-15  3:26 Tetsuya Mukawa
  2016-06-15 14:48 ` David Marchand
  2016-06-16  2:33 ` [dpdk-dev] [PATCH v2] eal: Fix wrong error checking while parsing device arguments Tetsuya Mukawa
  0 siblings, 2 replies; 18+ messages in thread
From: Tetsuya Mukawa @ 2016-06-15  3:26 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, john.mcnamara, michalx.k.jastrzebski, Tetsuya Mukawa

Currently, a return value of strdup() isn't checked correctly.
The patch fixes it.

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
 lib/librte_eal/common/eal_common_devargs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index 2bfe54a..e403717 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -58,7 +58,7 @@ rte_eal_parse_devargs_str(const char *devargs_str,
 		return -1;
 
 	*drvname = strdup(devargs_str);
-	if (drvname == NULL)
+	if (*drvname == NULL)
 		return -1;
 
 	/* set the first ',' to '\0' to split name and arguments */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-06-20  8:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15  3:26 [dpdk-dev] [PATCH] eal: Fix wrong error checking of rte_eal_parse_devargs_str() Tetsuya Mukawa
2016-06-15 14:48 ` David Marchand
2016-06-16  2:03   ` Tetsuya Mukawa
2016-06-16  2:33 ` [dpdk-dev] [PATCH v2] eal: Fix wrong error checking while parsing device arguments Tetsuya Mukawa
2016-06-15  3:26   ` [dpdk-dev] [PATCH] eal: Fix resource leak of pci_uio_map_secondary() Tetsuya Mukawa
2016-06-15 14:45     ` David Marchand
2016-06-16  2:03       ` Tetsuya Mukawa
2016-06-16  2:33     ` [dpdk-dev] [PATCH v2] eal: Fix resource leak while secondary process maps pci devices Tetsuya Mukawa
2016-06-17 12:28       ` David Marchand
2016-06-20  2:19         ` Tetsuya Mukawa
2016-06-20  8:50           ` Thomas Monjalon
2016-06-15  3:27   ` [dpdk-dev] [PATCH] eal: Fix wrong resource release of pci_uio_unmap() Tetsuya Mukawa
2016-06-15 15:01     ` David Marchand
2016-06-16  2:33     ` [dpdk-dev] [PATCH v2] eal: Fix wrong resource release while unmapping pci devices Tetsuya Mukawa
2016-06-17 12:12       ` David Marchand
2016-06-20  8:50         ` Thomas Monjalon
2016-06-17 12:10   ` [dpdk-dev] [PATCH v2] eal: Fix wrong error checking while parsing device arguments David Marchand
2016-06-20  8:49     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).