Skip to content

Commit

Permalink
utils: Initialize with NULL
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Jul 31, 2024
1 parent c907012 commit 616a664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/winevt/winevt_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static int ExpandSIDWString(PSID sid, CHAR **out_expanded)
SID_NAME_USE sid_type = SidTypeUnknown;
WCHAR wAccount[MAX_NAME];
WCHAR wDomain[MAX_NAME];
CHAR *account, *domain;
CHAR *account = NULL, *domain = NULL;
DWORD result_len = 0;
CHAR *formatted = NULL;
VALUE vformatted;
Expand Down Expand Up @@ -889,7 +889,7 @@ render_system_event(EVT_HANDLE hEvent, BOOL preserve_qualifiers, BOOL preserveSI

if (EvtVarTypeNull != pRenderedValues[EvtSystemUserID].Type) {
if (ConvertSidToStringSid(pRenderedValues[EvtSystemUserID].SidVal, &pwsSid)) {
CHAR *expandSID;
CHAR *expandSID = NULL;
if (preserveSID_p) {
rbstr = rb_utf8_str_new_cstr(pwsSid);
rb_hash_aset(hash, rb_str_new2("UserID"), rbstr);
Expand Down

0 comments on commit 616a664

Please sign in to comment.