cmd_append_layout: resolve_tilde already allocates memory
Fixes a small memory leak with all append_layout commands.
This commit is contained in:
parent
6f4b0e1fdd
commit
e424a31307
|
@ -789,11 +789,10 @@ void cmd_nop(I3_CMD, const char *comment) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void cmd_append_layout(I3_CMD, const char *cpath) {
|
void cmd_append_layout(I3_CMD, const char *cpath) {
|
||||||
char *path = sstrdup(cpath);
|
LOG("Appending layout \"%s\"\n", cpath);
|
||||||
LOG("Appending layout \"%s\"\n", path);
|
|
||||||
|
|
||||||
/* Make sure we allow paths like '~/.i3/layout.json' */
|
/* Make sure we allow paths like '~/.i3/layout.json' */
|
||||||
path = resolve_tilde(path);
|
char *path = resolve_tilde(cpath);
|
||||||
|
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
|
|
Loading…
Reference in New Issue