Project

General

Profile

Actions

Bug #1166

closed
VJ AH

tls: CID 1197759: Resource leak (RESOURCE_LEAK)

Bug #1166: tls: CID 1197759: Resource leak (RESOURCE_LEAK)

Added by Victor Julien about 12 years ago. Updated about 10 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);

VJ Updated by Victor Julien almost 11 years ago Actions #1

  • Target version changed from 3.0RC2 to 70

VJ Updated by Victor Julien about 10 years ago Actions #2

  • Assignee changed from Pierre Chifflier to OISF Dev

AH Updated by Andreas Herz about 10 years ago Actions #3

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?

VJ Updated by Victor Julien about 10 years ago Actions #4

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

AH Updated by Andreas Herz about 10 years ago Actions #5

VJ Updated by Victor Julien about 10 years ago Actions #6

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

Also available in: PDF Atom