Skip to content

Commit

Permalink
Free the message allocated by FormatMessageA (should have been in las…
Browse files Browse the repository at this point in the history
…t commit).
  • Loading branch information
cfis committed Apr 20, 2023
1 parent a17aeb8 commit 03b8801
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/ffi_c/DynamicLibrary.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ dl_error(char* buf, int size)

// Update the passed in buffer
snprintf(buf, size, "Failed with error %d: %s", error, message);

// Free the allocated message
LocalFree(message);
}
#endif

Expand Down

0 comments on commit 03b8801

Please sign in to comment.