diff options
author | Niels Provos <provos@gmail.com> | 2007-09-09 02:15:34 +0000 |
---|---|---|
committer | Niels Provos <provos@gmail.com> | 2007-09-09 02:15:34 +0000 |
commit | 8ee20a3fa46f7d603f5fa98cd47992fcdbb3beb6 (patch) | |
tree | 287cd99cb2dfbeeeceec2ad59f74b42cd04a5642 /test/regress_rpc.c | |
parent | e678f009a82b38745baac9874a3573136d0658b6 (diff) | |
download | libevent-8ee20a3fa46f7d603f5fa98cd47992fcdbb3beb6.tar.gz |
fix memory leaks/unitialized memory found by valgrind
svn:r418
Diffstat (limited to 'test/regress_rpc.c')
-rw-r--r-- | test/regress_rpc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/regress_rpc.c b/test/regress_rpc.c index 4e66ff53..a2dd8564 100644 --- a/test/regress_rpc.c +++ b/test/regress_rpc.c @@ -104,10 +104,13 @@ MessageCb(EVRPC_STRUCT(Message)* rpc, void *arg) EVRPC_REQUEST_DONE(rpc); } +static EVRPC_STRUCT(NeverReply) *saved_rpc; + void NeverReplyCb(EVRPC_STRUCT(NeverReply)* rpc, void *arg) { test_ok += 1; + saved_rpc = rpc; } static void @@ -541,6 +544,9 @@ rpc_client_timeout(void) event_dispatch(); + /* free the saved RPC structure up */ + EVRPC_REQUEST_DONE(saved_rpc); + rpc_teardown(base); if (test_ok != 2) { |