Skip to content
Permalink
Browse files
8261601: free memory in early return in Java_sun_nio_ch_sctp_SctpChan…
…nelImpl_receive0

Reviewed-by: clanger, dfuchs, bpb
  • Loading branch information
MBaesken committed Feb 16, 2021
1 parent e2d52ae commit cdc874d4c9610b77278c5703ffe20ce826b5370e
Showing 1 changed file with 2 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -475,6 +475,7 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_sctp_SctpChannelImpl_receive0
iov->iov_len = SCTP_NOTIFICATION_SIZE - rv;
if ((rv = recvmsg(fd, msg, flags)) < 0) {
handleSocketError(env, errno);
free(newBuf);
return 0;
}
bufp = newBuf;

1 comment on commit cdc874d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.