Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions yara-python.c
Original file line number Diff line number Diff line change
Expand Up @@ -2816,12 +2816,12 @@ static PyObject* yara_compile(
}
else if (file != NULL)
{
fd = dup(PyObject_AsFileDescriptor(file));
fd = PyObject_AsFileDescriptor(file);

if (fd != -1)
{
Py_BEGIN_ALLOW_THREADS
fh = fdopen(fd, "r");
fh = fdopen(dup(fd), "r");
error = yr_compiler_add_file(compiler, fh, NULL, NULL);
fclose(fh);
Py_END_ALLOW_THREADS
Expand Down
Loading