input: Free instance-private storage at instance free.

This commit is contained in:
Bert Vermeulen 2014-09-22 16:52:38 +02:00
parent d018181331
commit 89da5b3b54
6 changed files with 1 additions and 11 deletions

View File

@ -133,8 +133,6 @@ static int cleanup(struct sr_input *in)
packet.type = SR_DF_END; packet.type = SR_DF_END;
sr_session_send(in->sdi, &packet); sr_session_send(in->sdi, &packet);
} }
g_free(in->priv);
in->priv = NULL;
return SR_OK; return SR_OK;
} }

View File

@ -145,8 +145,6 @@ static int cleanup(struct sr_input *in)
packet.type = SR_DF_END; packet.type = SR_DF_END;
sr_session_send(in->sdi, &packet); sr_session_send(in->sdi, &packet);
} }
g_free(in->priv);
in->priv = NULL;
return SR_OK; return SR_OK;
} }

View File

@ -753,9 +753,6 @@ static int cleanup(struct sr_input *in)
if (inc->sample_buffer) if (inc->sample_buffer)
g_free(inc->sample_buffer); g_free(inc->sample_buffer);
g_free(inc);
in->priv = NULL;
return SR_OK; return SR_OK;
} }

View File

@ -552,6 +552,7 @@ SR_API int sr_input_free(const struct sr_input *in)
} }
if (in->buf) if (in->buf)
g_string_free(in->buf, TRUE); g_string_free(in->buf, TRUE);
g_free(in->priv);
g_free((gpointer)in); g_free((gpointer)in);
return ret; return ret;

View File

@ -519,8 +519,6 @@ static int cleanup(struct sr_input *in)
} }
g_slist_free_full(inc->channels, free_channel); g_slist_free_full(inc->channels, free_channel);
g_free(inc);
in->priv = NULL;
return SR_OK; return SR_OK;
} }

View File

@ -341,8 +341,6 @@ static int cleanup(struct sr_input *in)
packet.type = SR_DF_END; packet.type = SR_DF_END;
sr_session_send(in->sdi, &packet); sr_session_send(in->sdi, &packet);
} }
g_free(in->priv);
in->priv = NULL;
return SR_OK; return SR_OK;
} }