Skip to content

Commit c10d3d3

Browse files
committed
Fix potential heap corruption
`tmp` is allocated by `malloc()`, so we must not `LocalFree()` it.
1 parent 586f851 commit c10d3d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/sockets/sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ char *sockets_strerror(int error) /* {{{ */
659659
}
660660

661661
SOCKETS_G(strerror_buf) = estrdup(tmp);
662-
LocalFree(tmp);
662+
free(tmp);
663663

664664
buf = SOCKETS_G(strerror_buf);
665665
}

0 commit comments

Comments
 (0)