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:
James Muehlner 2016-01-28 10:52:33 -08:00
commit c42a1dc669

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;
}