Browse Source

fix call struct being accessed after obj_put

Change-Id: I33dea4d637c531bdf33c54485da5627b5eeb5a32
pull/305/head
Richard Fuchs 9 years ago
parent
commit
9036d30ed8
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      daemon/redis.c

+ 4
- 4
daemon/redis.c View File

@ -1471,7 +1471,6 @@ static void redis_restore_call(struct redis *r, struct callmaster *m, const redi
redis_restore_recording(c, &call);
err = NULL;
obj_put(c);
err8:
redis_destroy_list(&maps);
@ -1491,13 +1490,14 @@ err1:
log_info_clear();
if (err) {
rlog(LOG_WARNING, "Failed to restore call ID '%.*s' from Redis: %s", REDIS_FMT(id), err);
if (c) {
if (c)
call_destroy(c);
obj_put(c);
}
else
redisCommandNR(m->conf.redis_write->ctx, "SREM calls "PB"", STR_R(id));
}
if (c)
obj_put(c);
}


Loading…
Cancel
Save