summaryrefslogtreecommitdiffstats
path: root/src/afb-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afb-session.c')
-rw-r--r--src/afb-session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-session.c b/src/afb-session.c
index 07092cea..bc1c1c5f 100644
--- a/src/afb-session.c
+++ b/src/afb-session.c
@@ -98,7 +98,7 @@ static void free_data (struct afb_session *session)
session->cookies[idx] = NULL;
while (cookie != NULL) {
next = cookie->next;
- if (cookie->value != NULL && cookie->freecb != NULL)
+ if (cookie->freecb != NULL)
cookie->freecb(cookie->value);
free(cookie);
cookie = next;
@@ -420,7 +420,7 @@ int afb_session_set_cookie(struct afb_session *session, const void *key, void *v
cookie = session->cookies[idx];
while(cookie != NULL) {
if (cookie->key == key) {
- if (cookie->value != NULL && cookie->value != value && cookie->freecb != NULL)
+ if (cookie->value != value && cookie->freecb)
cookie->freecb(cookie->value);
cookie->value = value;
cookie->freecb = freecb;