Skip to content

Commit 9987636

Browse files
committed
utils: Release a heap memory for SID translation
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 797e3ce commit 9987636

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/winevt/winevt_utils.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ render_system_event(EVT_HANDLE hEvent, BOOL preserve_qualifiers, BOOL expandSID_
893893
ExpandSIDWString(pRenderedValues[EvtSystemUserID].SidVal,
894894
&expandSID) == 0) {
895895
rbstr = rb_utf8_str_new_cstr(expandSID);
896+
free(expandSID);
896897
} else {
897898
rbstr = rb_utf8_str_new_cstr(pwsSid);
898899
}

0 commit comments

Comments
 (0)