GUAC-1451: Fix order of resource release in case typescript creation failure.
This commit is contained in:
parent
897ee16e91
commit
b35a0c3695
@ -141,8 +141,8 @@ guac_terminal_typescript* guac_terminal_typescript_alloc(const char* path,
|
|||||||
O_CREAT | O_EXCL | O_WRONLY,
|
O_CREAT | O_EXCL | O_WRONLY,
|
||||||
S_IRUSR | S_IWUSR);
|
S_IRUSR | S_IWUSR);
|
||||||
if (typescript->timing_fd == -1) {
|
if (typescript->timing_fd == -1) {
|
||||||
free(typescript);
|
|
||||||
close(typescript->data_fd);
|
close(typescript->data_fd);
|
||||||
|
free(typescript);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user