]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: addons/51degrees: initialize variables
authorIlia Shipitsin <chipitsine@gmail.com>
Wed, 13 May 2026 16:12:01 +0000 (18:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 31 May 2026 08:26:24 +0000 (10:26 +0200)
Found via cppcheck  --force --enable=all --output-file=haproxy.log :
addons/51degrees/51d.c:1073:8: error: Uninitialized variable: _51d_prop_name.name [uninitvar]

addons/51degrees/51d.c

index 5642e9ed95500480b6413c7811d0ad4931fc0433..be2dc61bd596fdfd0bc9fcb5a989adb425113226 100644 (file)
@@ -1062,7 +1062,7 @@ static int init_51degrees(void)
 
 static void deinit_51degrees(void)
 {
-       struct _51d_property_names *_51d_prop_name, *_51d_prop_nameb;
+       struct _51d_property_names *_51d_prop_name = NULL, *_51d_prop_nameb = NULL;
 
 #if defined(FIFTYONEDEGREES_H_PATTERN_INCLUDED) || defined(FIFTYONEDEGREES_H_TRIE_INCLUDED)
        free(global_51degrees.header_names);