From a77b34a4ebdc994cce7a3d1f00121f421ca31b53 Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 7 Sep 2022 11:23:34 -0500 Subject: update README and fix memory leaks --- src/sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sound.c') diff --git a/src/sound.c b/src/sound.c index 7296578..73bd6d4 100644 --- a/src/sound.c +++ b/src/sound.c @@ -34,11 +34,11 @@ int sound_copy(struct mossrose_sound_t *dest, struct mossrose_sound_t *src) void sound_free_audio(struct mossrose_sound_t *sound) { - if (sound->left == NULL) { + if (sound->left != NULL) { free(sound->left); sound->left = NULL; } - if (sound->right == NULL) { + if (sound->right != NULL) { free(sound->right); sound->right = NULL; } -- cgit v1.2.1