Skip to content

Commit 136e8c8

Browse files
committed
Fixed dotnet module failure on Windows
create_full_name() used strdup() even on Windows where all str* functions are masked behind yr_str*() functions which internally used HeapAlloc()/HeapFree() which does not cooperate well with malloc()/free().
1 parent 65feab4 commit 136e8c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libyara/modules/dotnet/dotnet.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static const char* get_typedef_type(uint32_t flags)
274274
static char* create_full_name(const char* name, const char* namespace)
275275
{
276276
if (!name || !strlen(name))
277-
return namespace ? strdup(namespace) : NULL;
277+
return namespace ? yr_strdup(namespace) : NULL;
278278

279279
// No namespace -> return name only
280280
if (!namespace || !strlen(namespace))

0 commit comments

Comments
 (0)