Project

General

Profile

Actions

Bug #2676

closed

[patch] few memory leaks and dereference pointer issues

Added by devnexen over 8 years ago. Updated over 8 years ago.

Status:
Invalid
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

Hi all,

This is just a patch which fix few memory leaks and check some pointers before dereferencing.

Hope it is useful.

regards.


Files

patch-fewmemissues.diff (3.03 KB) patch-fewmemissues.diff devnexen, 2015-10-04 09:41
Actions #1

Updated by stbuehler over 8 years ago

  • Status changed from New to Invalid
  • Target version deleted (1.4.38)

Thanks for caring about code quality :)

But:
  • lemon.c is just a parser generator and is used only to build lighttpd. I have no intention to do anything more than really super trivial and obvious fixes. (Also you don't need to check pointers before calling free)
  • the other checks should be done when the values gets assigned; force_assert is always active at runtime, and I don't want to check every pointer with force_assert before using it.
    Also force_assert just makes it crash with a nicer error message; dereferencing NULL pointers (or near NULL in case of small structs like buffer) should always trigger a segfault.
Actions

Also available in: Atom