Skip to content

Commit

Permalink
Free strdup'ed values
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Jun 8, 2016
1 parent 047ffe9 commit 615fc04
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ui/drivers/ui_cocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,16 @@ - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
}
else
{
ui_msg_window_state msg_window_state;
const ui_msg_window_t *msg_window = ui_companion_driver_get_msg_window_ptr();
if (msg_window)
{
msg_window_state.text = strdup("Cannot open multiple files");
msg_window_state.text = strdup("RetroArch");
ui_msg_window_state msg_window_state;
msg_window_state.text = strdup("Cannot open multiple files");
msg_window_state.title = strdup("RetroArch");
msg_window->information(&msg_window_state);

free(msg_window_state.text);
free(msg_window_state.title);
}
[sender replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
}
Expand Down

0 comments on commit 615fc04

Please sign in to comment.