input: Free instance-private storage at instance free.
This commit is contained in:
parent
d018181331
commit
89da5b3b54
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue