Project

General

Profile

Actions

Bug #4724

closed

pcre2: scan-build warning

Added by Victor Julien over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

detect-pcre.c:269:29: warning: Potential leak of memory pointed to by 'str_ptr' [unix.Malloc]
                            pcre2_substring_free((PCRE2_UCHAR8 *)pcre2_str_ptr);
                            ^~~~~~~~~~~~~~~~~~~~
/usr/include/pcre2.h:895:47: note: expanded from macro 'pcre2_substring_free'
#define pcre2_substring_free                  PCRE2_SUFFIX(pcre2_substring_free_)
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pcre2.h:975:25: note: expanded from macro 'PCRE2_SUFFIX'
#define PCRE2_SUFFIX(a) PCRE2_GLUE(a, PCRE2_CODE_UNIT_WIDTH)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pcre2.h:797:25: note: expanded from macro 'PCRE2_GLUE'
#define PCRE2_GLUE(a,b) PCRE2_JOIN(a,b)
                        ^~~~~~~~~~~~~~~
/usr/include/pcre2.h:796:25: note: expanded from macro 'PCRE2_JOIN'
#define PCRE2_JOIN(a,b) a ## b
                        ^~~~~~
<scratch space>:23:1: note: expanded from here
pcre2_substring_free_8
^~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Actions

Also available in: Atom PDF