Skip to content

Commit e34b8bc

Browse files
fix: boolean logic for cleanup (#40)
1 parent 52dfffa commit e34b8bc

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

c_src/xav/xav_encoder.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ ERL_NIF_TERM new (ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) {
153153
enif_release_resource(xav_encoder);
154154

155155
clean:
156-
if (!codec_name)
156+
if (codec_name)
157157
XAV_FREE(codec_name);
158-
if (!format)
158+
if (format)
159159
XAV_FREE(format);
160-
if (!config_name)
160+
if (config_name)
161161
XAV_FREE(config_name);
162-
if (!profile)
162+
if (profile)
163163
XAV_FREE(profile);
164-
if (!channel_layout)
164+
if (channel_layout)
165165
XAV_FREE(channel_layout);
166166
enif_map_iterator_destroy(env, &iter);
167167

0 commit comments

Comments
 (0)