Commit 4a075de846cf420a9dffb0ee25401d5d4002dc5b
1 parent
3dac803c
fix bug that arose in rewrite of header get and results in an ugly memory leak, …
…as well as no headers would be found any more
Showing
5 changed files
with
15 additions
and
3 deletions
1 | +2012-02-10 05:52:50 +0100 Georg Hopp | |
2 | + | |
3 | + * fix bug that arose in rewrite of header get and results in an ugly memory leak, as well as no headers would be found any more (HEAD, master) | |
4 | + | |
5 | +2012-02-10 00:27:51 +0100 Georg Hopp | |
6 | + | |
7 | + * fix memory leak created while changing things | |
8 | + | |
1 | 9 | 2012-02-09 22:39:08 +0100 Georg Hopp |
2 | 10 | |
3 | - * updated docs (HEAD, master) | |
11 | + * updated docs | |
4 | 12 | |
5 | 13 | 2012-02-09 22:34:32 +0100 Georg Hopp |
6 | 14 | ... | ... |
... | ... | @@ -35,7 +35,7 @@ httpHeaderGet(const HttpHeader header[], int nheader, const char * name) |
35 | 35 | |
36 | 36 | found = bsearch(&hash, header, nheader, sizeof(HttpHeader), comp); |
37 | 37 | |
38 | - return (NULL != *found)? (*found)->value : NULL; | |
38 | + return (NULL != found)? (*found)->value : NULL; | |
39 | 39 | } |
40 | 40 | |
41 | 41 | // vim: set ts=4 sw=4: | ... | ... |
1 | +#include <stdlib.h> | |
2 | + | |
1 | 3 | #include "http/header.h" |
2 | 4 | |
3 | 5 | static |
... | ... | @@ -13,7 +15,7 @@ comp (const void * _a, const void * _b) |
13 | 15 | void |
14 | 16 | httpHeaderSort(const HttpHeader header[], int nheader) |
15 | 17 | { |
16 | - qsort(header, nheader, sizeof(HttpHeader), comp); | |
18 | + qsort((void*)header, nheader, sizeof(HttpHeader), comp); | |
17 | 19 | } |
18 | 20 | |
19 | 21 | // vim: set ts=4 sw=4: | ... | ... |
Please
register
or
login
to post a comment