Merge pull request #105 from glyptodon/fix-free-order
GUAC-1451: Fix order of resource release in case typescript creation failure.
This commit is contained in:
commit
c42a1dc669
@ -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