summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-08 22:31:02 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-08 22:31:02 +0000
commitc3d826bb2b44deec5110987ab233a604f2184a33 (patch)
tree81f4061111de2ae98e48b582821a42db1f1b5bd0 /ext/socket/ancdata.c
parentfb684ba4c26778120233f630d8ca39ada3e9b17f (diff)
ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard
The control buffer may be used throughout the function, so prevent the string from being lost to GC. * ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard [Bug #11123] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index f0dbb2b..3eaed1c 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1711,6 +1711,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
discard_cmsg(cmh, msg_end, (flags & MSG_PEEK) != 0);
rb_ary_push(ret, ctl);
}
+ RB_GC_GUARD(ctl_str);
}
#endif