GUAC-1451: Fix order of resource release in case typescript creation failure.

This commit is contained in:
Michael Jumper 2016-01-28 10:47:04 -08:00
parent 897ee16e91
commit b35a0c3695

View File

@ -141,8 +141,8 @@ guac_terminal_typescript* guac_terminal_typescript_alloc(const char* path,
O_CREAT | O_EXCL | O_WRONLY,
S_IRUSR | S_IWUSR);
if (typescript->timing_fd == -1) {
free(typescript);
close(typescript->data_fd);
free(typescript);
return NULL;
}