This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project iwhd.git.
The branch, master has been updated via 604fc112cbda1ab89d8c94554055e447ab225c6d (commit) via ddf6a9609e1663eb5444232b77446ae2c5b1da0a (commit) from 56bccd9c5ee7dfce955b38519f89b34b5a14e9ec (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/iwhd.git/commit/604fc112cbda1ab89d8c94554055e447ab225c6d
commit 604fc112cbda1ab89d8c94554055e447ab225c6d Author: Jim Meyering meyering@redhat.com Date: Sat Dec 11 15:41:52 2010 +0100
plug a leak
rest.c (proxy_put_data): Plug a leak exposed by reserved-object-name testing. Without this, "make -C t check TESTS=basic" with valgrind- wrapped iwhd would leak one "ms" object per reserved word test here:
for obj_name in _default _new _policy _query; do echo reserved-obj-name | curl -f -T - $bucket/$obj_name 2> bad_oname.err ...
2,240 bytes in 4 blocks are definitely lost in loss record 311 of 316 at 0x4A04896: calloc (vg_replace_malloc.c:418) by 0x42EA18: access_handler (rest.c:1967) by 0x4E405F8: ??? (in /usr/lib64/libmicrohttpd.so.10.0.0) by 0x4E4105F: MHD_connection_handle_idle (in /usr/lib64/libmicrohttpd.so.10.0.0) by 0x4E43986: ??? (in /usr/lib64/libmicrohttpd.so.10.0.0) by 0x3F49806D5A: start_thread (pthread_create.c:301) by 0x3F48CE4AAC: clone (clone.S:115)
diff --git a/rest.c b/rest.c index bcb32b4..aa9854a 100644 --- a/rest.c +++ b/rest.c @@ -452,6 +452,7 @@ proxy_put_data (void *cctx, struct MHD_Connection *conn, const char *url, } MHD_queue_response(conn,MHD_HTTP_FORBIDDEN,resp); MHD_destroy_response(resp); + free_ms(ms); return MHD_YES; } ms->state = MS_NORMAL;
http://repo.or.cz/w/iwhd.git/commit/ddf6a9609e1663eb5444232b77446ae2c5b1da0a
commit ddf6a9609e1663eb5444232b77446ae2c5b1da0a Author: Jim Meyering meyering@redhat.com Date: Sat Dec 11 17:43:35 2010 +0100
plug leaks-after-OOM-failure
* rest.c (proxy_object_post, proxy_update_prov): Call free_ms before returning.
diff --git a/rest.c b/rest.c index d07e9b5..bcb32b4 100644 --- a/rest.c +++ b/rest.c @@ -1511,6 +1511,7 @@ proxy_object_post (void *cctx, struct MHD_Connection *conn, const char *url, MHD_NO,MHD_NO); if (!resp) { fprintf(stderr,"MHD_crfd failedn"); + free_ms(ms); return MHD_NO; } MHD_queue_response(conn,rc,resp); @@ -1678,8 +1679,8 @@ proxy_update_prov (void *cctx, struct MHD_Connection *conn, const char *url, resp = MHD_create_response_from_data(0,NULL,MHD_NO,MHD_NO); if (!resp) { fprintf(stderr,"MHD_crfd failedn"); + free_ms(ms); return MHD_NO; - // FIXME: be careful that this does not leak "ms" } MHD_queue_response(conn,rc,resp); MHD_destroy_response(resp);
-----------------------------------------------------------------------
Summary of changes: rest.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
repo.or.cz automatic notification. Contact project admin jim@meyering.net if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.