diff options
author | Konstantin Pereiaslov <perk11@perk11.info> | 2023-05-28 02:53:02 -0500 |
---|---|---|
committer | Konstantin Pereiaslov <perk11@perk11.info> | 2023-05-28 02:53:02 -0500 |
commit | c62dc47f6822e7fbd3f3cda9fdb9d16ea59d236c (patch) | |
tree | 539d02c96dbdc8352c7635f2f6241ad38a23d6fb | |
parent | e3e90723b145db73d2ff7a62867a5a61e20b5434 (diff) |
Free memory used for storing shell command string once it's no longer needed.0.2.0
-rw-r--r-- | main.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -188,6 +188,7 @@ int main(int argc, char *argv[]) { XScreenSaverInfo *info = XScreenSaverAllocInfo(); pid = run_shell_command(shell_command_to_run, pid); + free(shell_command_to_run); // Let command run for 300ms to give it a chance to error-out or provide initial output. // 300ms is chosen to avoid giving user a noticeable delay while giving most quick commands a chance to finish. |