]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect-engine: check return value of SCGetConf
authorLukas Sismis <lsismis@oisf.net>
Fri, 25 Apr 2025 12:33:00 +0000 (14:33 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 5 Jun 2025 17:14:30 +0000 (19:14 +0200)
Ticket: 7634
coverity id: 1645571

src/detect-engine.c

index c2243d88c93d439e8652a3729b26ee12df008800..a09502f5729db24c09412a328756223d95581518 100644 (file)
@@ -2457,9 +2457,7 @@ const char *DetectEngineMpmCachingGetPath(void)
 
     char yamlpath[] = "detect.sgh-mpm-caching-path";
     const char *strval = NULL;
-    (void)SCConfGet(yamlpath, &strval);
-
-    if (strval != NULL) {
+    if (SCConfGet(yamlpath, &strval) == 1 && strval != NULL) {
         return strval;
     }