Commit Graph

7 Commits (6717c356e3d23dccbd837c85e37e51566e7a4f54)

Author SHA1 Message Date
Victor Julien fd6fd9ce48 Fix memory leak in proto - name mapping
==15745== 3 bytes in 1 blocks are definitely lost in loss record 5 of 615
==15745==    at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15745==    by 0x71858C1: strdup (strdup.c:42)
==15745==    by 0xA20814: SCProtoNameInit (util-proto-name.c:75)
==15745==    by 0x952D1B: PostConfLoadedSetup (suricata.c:1983)
==15745==    by 0x9537CD: main (suricata.c:2112)

Also, clean up and add a check to make sure it's initialized only once.
13 years ago
Eric Leblond 28c5c68192 error checking: add missing alloc error treatment
The return of some malloc like functions was not treated in some
places of the code.
13 years ago
Anoop Saldanha d041b98d95 fix for #771.
Fix /etc/protocols parsing.  Remove trailing newspace stored under some cases.
14 years ago
Victor Julien 55da9787a4 Win32 compile fixes. 15 years ago
Anoop Saldanha 797b1a44c7 Replace all strdup with SCStrdup 15 years ago
Victor Julien bac621760e Fix a potential invalid memory read in the protocol name code used by alert-fastlog. 16 years ago
Gurvinder Singh 3eab715153 support for printing protocol names for known protocol 16 years ago