Actions
Bug #1171
closedaddress parsing: resource leaks on errors
Status:
Closed
Priority:
Low
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:
Description
*** CID 1038119: Resource leak (RESOURCE_LEAK) /src/detect-engine-address.c: 1353 in DetectAddressTestConfVars() 1347 DetectAddressHead *gh = DetectAddressHeadInit(); 1348 if (gh == NULL) { 1349 goto error; 1350 } 1351 DetectAddressHead *ghn = DetectAddressHeadInit(); 1352 if (ghn == NULL) { >>> CID 1038119: Resource leak (RESOURCE_LEAK) >>> Variable "gh" going out of scope leaks the storage it points to. 1353 goto error; 1354 } 1355 1356 if (seq_node->val == NULL) { 1357 SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, 1358 "Address var \"%s\" probably has a sequence(something " /src/detect-engine-address.c: 1361 in DetectAddressTestConfVars() 1355 1356 if (seq_node->val == NULL) { 1357 SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, 1358 "Address var \"%s\" probably has a sequence(something " 1359 "in brackets) value set without any quotes. Please " 1360 "quote it using \"..\".", seq_node->name); >>> CID 1038119: Resource leak (RESOURCE_LEAK) >>> Variable "gh" going out of scope leaks the storage it points to. 1361 goto error; 1362 } 1363 1364 int r = DetectAddressParse2(gh, ghn, seq_node->val, /* start with negate no */0); 1365 if (r < 0) { 1366 SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, *** CID 1038120: Resource leak (RESOURCE_LEAK) /src/detect-engine-address.c: 1361 in DetectAddressTestConfVars() 1355 1356 if (seq_node->val == NULL) { 1357 SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, 1358 "Address var \"%s\" probably has a sequence(something " 1359 "in brackets) value set without any quotes. Please " 1360 "quote it using \"..\".", seq_node->name); >>> CID 1038120: Resource leak (RESOURCE_LEAK) >>> Variable "ghn" going out of scope leaks the storage it points to. 1361 goto error; 1362 } 1363 1364 int r = DetectAddressParse2(gh, ghn, seq_node->val, /* start with negate no */0); 1365 if (r < 0) { 1366 SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY,
Actions