Project

General

Profile

Actions

Bug #1171

closed

address parsing: resource leaks on errors

Added by Victor Julien almost 10 years ago. Updated almost 8 years ago.

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 #1

Updated by Victor Julien almost 9 years ago

  • Target version changed from 3.0RC2 to 70
Actions #2

Updated by Victor Julien almost 8 years ago

  • Status changed from New to Closed
  • Assignee deleted (OISF Dev)
  • Target version deleted (70)

Coverity says fixed 2014-10-10 23:43:50

Actions

Also available in: Atom PDF