diff options
author | 2015-12-23 07:53:08 -0500 | |
---|---|---|
committer | 2015-12-23 07:53:08 -0500 | |
commit | f438d3897d165a978226bac22e897e8522f65de8 (patch) | |
tree | 22876e141967dc3a8f80b11d79828f692643c473 /swaygrab/main.c | |
parent | Merge pull request #399 from gpyh/dont-hardcode-path (diff) | |
parent | swaygrab: Fix memory leak when recording videos (diff) | |
download | sway-f438d3897d165a978226bac22e897e8522f65de8.tar.gz sway-f438d3897d165a978226bac22e897e8522f65de8.tar.zst sway-f438d3897d165a978226bac22e897e8522f65de8.zip |
Merge pull request #398 from juju2143/bug-correction-1
swaygrab: Fix memory leak when recording videos
Diffstat (limited to 'swaygrab/main.c')
-rw-r--r-- | swaygrab/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/swaygrab/main.c b/swaygrab/main.c index 1120f0d5..d64d2ff2 100644 --- a/swaygrab/main.c +++ b/swaygrab/main.c | |||
@@ -94,6 +94,7 @@ void grab_and_apply_movie_magic(const char *file, const char *output, | |||
94 | 94 | ||
95 | fwrite(pixels, 1, len, f); | 95 | fwrite(pixels, 1, len, f); |
96 | 96 | ||
97 | free(pixels - 9); | ||
97 | clock_gettime(CLOCK_MONOTONIC, &finish); | 98 | clock_gettime(CLOCK_MONOTONIC, &finish); |
98 | ts.tv_nsec = ns; | 99 | ts.tv_nsec = ns; |
99 | double fts = (double)finish.tv_sec + 1.0e-9*finish.tv_nsec; | 100 | double fts = (double)finish.tv_sec + 1.0e-9*finish.tv_nsec; |