summaryrefslogtreecommitdiff
path: root/source4/rpc_server/dcerpc_tcp.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-14 03:51:48 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-14 03:51:48 +0000
commit089ae5e43543a4654dddd42d61eb84a8036c4780 (patch)
tree80805005ce6600152378113fd31a35e3e8563b45 /source4/rpc_server/dcerpc_tcp.c
parent8f6b3eb1a9c1e996330b0edfb312b2345e292819 (diff)
downloadsamba-089ae5e43543a4654dddd42d61eb84a8036c4780.tar.gz
samba-089ae5e43543a4654dddd42d61eb84a8036c4780.tar.bz2
samba-089ae5e43543a4654dddd42d61eb84a8036c4780.zip
fixed some memory leaks in the rpc server code
(This used to be commit 20458556017f426ab57ca9a9d098cacecefbdcff)
Diffstat (limited to 'source4/rpc_server/dcerpc_tcp.c')
-rw-r--r--source4/rpc_server/dcerpc_tcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/rpc_server/dcerpc_tcp.c b/source4/rpc_server/dcerpc_tcp.c
index ee026b3674..c9aeb400d0 100644
--- a/source4/rpc_server/dcerpc_tcp.c
+++ b/source4/rpc_server/dcerpc_tcp.c
@@ -100,10 +100,12 @@ static void dcerpc_read_handler(struct event_context *ev, struct fd_event *fde,
ret = read(fde->fd, blob.data, blob.length);
if (ret == 0 || (ret == -1 && errno != EINTR)) {
+ data_blob_free(&blob);
terminate_rpc_session(r, "eof on socket");
return;
}
if (ret == -1) {
+ data_blob_free(&blob);
return;
}
@@ -265,6 +267,8 @@ static void add_socket_rpc(struct event_context *events,
r, e->endpoint_ops);
}
}
+
+ free(r);
}
/****************************************************************************