fd = open (expfn, oflags | O_LARGEFILE, mode);
if (fd == -1)
{
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "open", fn);
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "open", expfn);
+ GNUNET_free (expfn);
return NULL;
}
#else
if (h == INVALID_HANDLE_VALUE)
{
SetErrnoFromWinError (GetLastError ());
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "open", fn);
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "open", expfn);
+ GNUNET_free (expfn);
return NULL;
}
if (SetFilePointer (h, 0, 0, FILE_END) == INVALID_SET_FILE_POINTER)
{
SetErrnoFromWinError (GetLastError ());
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "SetFilePointer", fn);
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "SetFilePointer", expfn);
CloseHandle (h);
+ GNUNET_free (expfn);
return NULL;
}
#endif
#else
ret->fd = fd;
#endif
-
+ GNUNET_free (expfn);
return ret;
}