mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 11:16:21 +00:00
Attempt to open file later to prevent potential resource leak
This commit is contained in:
@@ -4917,8 +4917,6 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE* fh = fdopen(fd, "rb");
|
|
||||||
|
|
||||||
gboolean omemo_enabled = FALSE;
|
gboolean omemo_enabled = FALSE;
|
||||||
gboolean sendfile_enabled = TRUE;
|
gboolean sendfile_enabled = TRUE;
|
||||||
|
|
||||||
@@ -4952,6 +4950,8 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILE* fh = fdopen(fd, "rb");
|
||||||
|
|
||||||
if (omemo_enabled) {
|
if (omemo_enabled) {
|
||||||
#ifdef HAVE_OMEMO
|
#ifdef HAVE_OMEMO
|
||||||
char* err = NULL;
|
char* err = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user