Skip to content

Commit 8be4510

Browse files
authored
Fix possible crash with freed resource (#3402)
Signed-off-by: Bob Weinand <[email protected]>
1 parent 0a38276 commit 8be4510

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/integrations/exec_integration.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ PHP_FUNCTION(DDTrace_Integrations_Exec_proc_get_span) {
237237
}
238238

239239
zend_resource *span_res = proc_h->pipes[proc_h->npipes - 1];
240-
if (span_res->type != le_proc_span) {
240+
if (span_res->type != le_proc_span || !span_res->ptr) {
241241
RETURN_NULL();
242242
}
243243

0 commit comments

Comments
 (0)