1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Prevent complaining about leaking clipboard

This commit is contained in:
Petr Baudis 2006-01-06 17:08:38 +01:00 committed by Petr Baudis
parent 0c40ff05c9
commit a637349b32

View File

@ -379,8 +379,9 @@ set_clipboard_text(unsigned char *data)
if (str.source) done_string(&str);
}
if (clipboard) mem_free(clipboard);
clipboard = stracpy(data);
/* Shouldn't complain about leaks. */
if (clipboard) free(clipboard);
clipboard = strdup(data);
}
/* Set xterm-like term window's title. */