repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rpc_read_from_socket: fix use-after-free due to missing return
[deb_libnfs.git]
/
lib
/
socket.c
diff --git
a/lib/socket.c
b/lib/socket.c
index 037fbbef5f51ce0c3038c96e2a327c822149bf24..055109a73c9f7b4be1f69d73f0552feb5c2d51ff 100644
(file)
--- a/
lib/socket.c
+++ b/
lib/socket.c
@@
-210,6
+210,7
@@
static int rpc_read_from_socket(struct rpc_context *rpc)
if (count < 0) {
rpc_set_error(rpc, "Failed recvfrom: %s", strerror(errno));
free(buf);
+ return -1;
}
if (rpc_process_pdu(rpc, buf, count) != 0) {
rpc_set_error(rpc, "Invalid/garbage pdu received from server. Ignoring PDU");