Skip to content

Commit 9632e6f

Browse files
committed
earlier exit when an exception is raised
1 parent 76332f8 commit 9632e6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/sysvmsg/sysvmsg.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ PHP_FUNCTION(msg_send)
371371
php_var_serialize(&msg_var, message, &var_hash);
372372
PHP_VAR_SERIALIZE_DESTROY(var_hash);
373373

374+
if (UNEXPECTED(EG(exception))) {
375+
smart_str_free(&msg_var);
376+
RETURN_FALSE;
377+
}
378+
374379
message_len = smart_str_get_len(&msg_var);
375380

376381
/* NB: php_msgbuf is 1 char bigger than a long, so there is no need to

0 commit comments

Comments
 (0)