From: Bert Vermeulen Date: Mon, 22 Sep 2014 14:52:38 +0000 (+0200) Subject: input: Free instance-private storage at instance free. X-Git-Tag: libsigrok-0.4.0~920 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=89da5b3b54d3b87bff49e716c4d2b36080fe7a07;p=libsigrok.git input: Free instance-private storage at instance free. --- diff --git a/src/input/binary.c b/src/input/binary.c index 15dc0da1..e3b2d243 100644 --- a/src/input/binary.c +++ b/src/input/binary.c @@ -133,8 +133,6 @@ static int cleanup(struct sr_input *in) packet.type = SR_DF_END; sr_session_send(in->sdi, &packet); } - g_free(in->priv); - in->priv = NULL; return SR_OK; } diff --git a/src/input/chronovu_la8.c b/src/input/chronovu_la8.c index 9c82506a..727d68e9 100644 --- a/src/input/chronovu_la8.c +++ b/src/input/chronovu_la8.c @@ -145,8 +145,6 @@ static int cleanup(struct sr_input *in) packet.type = SR_DF_END; sr_session_send(in->sdi, &packet); } - g_free(in->priv); - in->priv = NULL; return SR_OK; } diff --git a/src/input/csv.c b/src/input/csv.c index c6aabd96..fb284f86 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -753,9 +753,6 @@ static int cleanup(struct sr_input *in) if (inc->sample_buffer) g_free(inc->sample_buffer); - g_free(inc); - in->priv = NULL; - return SR_OK; } diff --git a/src/input/input.c b/src/input/input.c index 02f7db1b..287fcede 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -552,6 +552,7 @@ SR_API int sr_input_free(const struct sr_input *in) } if (in->buf) g_string_free(in->buf, TRUE); + g_free(in->priv); g_free((gpointer)in); return ret; diff --git a/src/input/vcd.c b/src/input/vcd.c index 9d164f98..6854bf81 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -519,8 +519,6 @@ static int cleanup(struct sr_input *in) } g_slist_free_full(inc->channels, free_channel); - g_free(inc); - in->priv = NULL; return SR_OK; } diff --git a/src/input/wav.c b/src/input/wav.c index b6a7e518..9eb5627f 100644 --- a/src/input/wav.c +++ b/src/input/wav.c @@ -341,8 +341,6 @@ static int cleanup(struct sr_input *in) packet.type = SR_DF_END; sr_session_send(in->sdi, &packet); } - g_free(in->priv); - in->priv = NULL; return SR_OK; }