Skip to content

Commit

Permalink
jack: Fix jackaudio plugin free() issue
Browse files Browse the repository at this point in the history
  • Loading branch information
okuoku committed Apr 22, 2019
1 parent 15e315e commit 0b1b12f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions gst-jack/gstjackaudiosink.c
Expand Up @@ -488,7 +488,7 @@ gst_jack_ring_buffer_acquire (GstAudioRingBuffer * buf,
if (res != 0 && res != EEXIST)
goto cannot_connect;
}
free (ports);
jack_free (ports);
}
done:

Expand Down Expand Up @@ -523,7 +523,7 @@ gst_jack_ring_buffer_acquire (GstAudioRingBuffer * buf,
GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS, (NULL),
("Could not connect output ports to physical ports (%d:%s)",
res, g_strerror (res)));
free (ports);
jack_free (ports);
return FALSE;
}
}
Expand Down Expand Up @@ -927,7 +927,7 @@ gst_jack_audio_sink_getcaps (GstBaseSink * bsink, GstCaps * filter)
max = 0;
if (ports != NULL) {
for (; ports[max]; max++);
free (ports);
jack_free (ports);
} else
max = 0;
} else {
Expand Down
4 changes: 2 additions & 2 deletions gst-jack/gstjackaudiosrc.c
Expand Up @@ -502,7 +502,7 @@ gst_jack_ring_buffer_acquire (GstAudioRingBuffer * buf,
if (res != 0 && res != EEXIST)
goto cannot_connect;
}
free (ports);
jack_free (ports);
}
done:

Expand Down Expand Up @@ -537,7 +537,7 @@ gst_jack_ring_buffer_acquire (GstAudioRingBuffer * buf,
GST_ELEMENT_ERROR (src, RESOURCE, SETTINGS, (NULL),
("Could not connect input ports to physical ports (%d:%s)",
res, g_strerror (res)));
free (ports);
jack_free (ports);
return FALSE;
}
}
Expand Down

0 comments on commit 0b1b12f

Please sign in to comment.