summaryrefslogtreecommitdiff
path: root/lib/tsocket/tsocket_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsocket/tsocket_bsd.c')
-rw-r--r--lib/tsocket/tsocket_bsd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 9027bc9711..9d5a3290d9 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -887,8 +887,11 @@ static void tdgram_bsd_recvfrom_handler(void *private_data)
* some systems too much bytes in tsocket_bsd_pending()
* the return value includes some IP/UDP header bytes
*/
+ state->buf = talloc_realloc(state, state->buf, uint8_t, ret);
+ if (tevent_req_nomem(state->buf, req)) {
+ return;
+ }
state->len = ret;
- talloc_realloc(state, state->buf, uint8_t, ret);
tevent_req_done(req);
}