[prev in list] [next in list] [prev in thread] [next in thread]
List: uwsgi
Subject: [uWSGI] [PATCH] uwsgi_do_sendfile: check malloc and realloc
From: roberto () unbit ! it (Roberto De Ioris)
Date: 2011-11-29 6:46:39
Message-ID: 52f6e4c90ba3695921a9bead46af3eb9.squirrel () manage ! unbit ! it
[Download RAW message or body]
> Hello,
>
> for platforms that does not have sendfile we have to allocate a static
> chunk of memory with malloc and do a realloc if we need more space. In
> the case of failed allocation we should return instead of segfault.
> Compile tested only.
>
> Reported by cppcheck:
>
> [sendfile.c:118]: (error) Common realloc mistake: 'nosf_buf' nulled but
> not freed upon failure
>
> This is the last cppcheck error we can do something about :)
>
>
and this has been applied too
--
Roberto De Ioris
http://unbit.it
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic