Merge pull request #3205 from orestisf1993/free

cmd_append_layout: resolve_tilde already allocates memory
next
Ingo Bürk 2018-03-27 09:02:28 +02:00 committed by GitHub
commit 45be56be33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -789,11 +789,10 @@ void cmd_nop(I3_CMD, const char *comment) {
*
*/
void cmd_append_layout(I3_CMD, const char *cpath) {
char *path = sstrdup(cpath);
LOG("Appending layout \"%s\"\n", path);
LOG("Appending layout \"%s\"\n", cpath);
/* Make sure we allow paths like '~/.i3/layout.json' */
path = resolve_tilde(path);
char *path = resolve_tilde(cpath);
char *buf = NULL;
ssize_t len;