Project

General

Profile

Actions

Bug #1166

closed

tls: CID 1197759: Resource leak (RESOURCE_LEAK)

Added by Victor Julien about 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Low
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Coverity scan of master branch:

*** CID 1197759:  Resource leak  (RESOURCE_LEAK)
/src/detect-tls-version.c: 205 in DetectTlsVersionParse()
199             } else if (strcmp("1.1", tmp_str) == 0) {
200                 temp = TLS_VERSION_11;
201             } else if (strcmp("1.2", tmp_str) == 0) {
202                 temp = TLS_VERSION_12;
203             } else {
204                 SCLogError(SC_ERR_INVALID_VALUE, "Invalid value");
>>>     CID 1197759:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "orig" going out of scope leaks the storage it points to.
205                 goto error;
206             }
207     
208             tls->ver = temp;
209     
210             SCFree(orig);

Actions #1

Updated by Victor Julien about 9 years ago

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

Updated by Victor Julien over 8 years ago

  • Assignee changed from Pierre Chifflier to OISF Dev
Actions #3

Updated by Andreas Herz over 8 years ago

This should be easily fixed by adding SCFree(orig); into the error: section.

Can you share more details how you did this coverity scan or did you just add it to your github account and used the travis ci?

Actions #4

Updated by Victor Julien over 8 years ago

It's a hosted service by Coverity. I run it manually as we have a limited number of scans per week.

Actions #6

Updated by Victor Julien over 8 years ago

  • Assignee changed from OISF Dev to Andreas Herz
  • Target version changed from 70 to 3.0.1RC1
Actions

Also available in: Atom PDF