]> sigrok.org Git - libsigrok.git/commitdiff
input: Free instance-private storage at instance free.
authorBert Vermeulen <redacted>
Mon, 22 Sep 2014 14:52:38 +0000 (16:52 +0200)
committerBert Vermeulen <redacted>
Mon, 29 Sep 2014 23:49:58 +0000 (01:49 +0200)
src/input/binary.c
src/input/chronovu_la8.c
src/input/csv.c
src/input/input.c
src/input/vcd.c
src/input/wav.c

index 15dc0da191702b75291377d4ae05bcd621f1f83e..e3b2d243f080ee845c37d6cac77bb5db105048ed 100644 (file)
@@ -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;
 }
index 9c82506a7584a27ce0841b72ae331dc457a6416c..727d68e94fa6ad956627dba44527d9fa215fda6a 100644 (file)
@@ -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;
 }
index c6aabd965e7347111b9a1c2328b9853203dd258c..fb284f86423f74aea6f43296df3e27713c2ed0f7 100644 (file)
@@ -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;
 }
 
index 02f7db1b928c92bbed73f15e115d725c48c7b238..287fcede93c2fa12295fb9eb41d1e8dbccec2636 100644 (file)
@@ -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;
index 9d164f9884567e810ad4ff1c51dca2d110ff8562..6854bf8114ca40dc94cb958248507f84d5824935 100644 (file)
@@ -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;
 }
index b6a7e5185add90c6eb2d8ccd7d69b4e285468a44..9eb5627f2ba49fbbf3c80b91ef575cd6fbeb20eb 100644 (file)
@@ -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;
 }