mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Fixed memory leak.
This commit is contained in:
parent
c60a4d9b0b
commit
4726de661b
1 changed files with 3 additions and 1 deletions
4
data.c
4
data.c
|
@ -1099,7 +1099,7 @@ int actor_get(snac *snac, const char *actor, d_char **data)
|
||||||
/* returns an already downloaded actor */
|
/* returns an already downloaded actor */
|
||||||
{
|
{
|
||||||
int status = 200;
|
int status = 200;
|
||||||
char *d;
|
d_char *d;
|
||||||
|
|
||||||
if (strcmp(actor, snac->actor) == 0) {
|
if (strcmp(actor, snac->actor) == 0) {
|
||||||
/* this actor */
|
/* this actor */
|
||||||
|
@ -1115,6 +1115,8 @@ int actor_get(snac *snac, const char *actor, d_char **data)
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
*data = d;
|
*data = d;
|
||||||
|
else
|
||||||
|
d = xs_free(d);
|
||||||
|
|
||||||
xs *fn = _object_fn(actor);
|
xs *fn = _object_fn(actor);
|
||||||
double max_time;
|
double max_time;
|
||||||
|
|
Loading…
Reference in a new issue