diff options
-rw-r--r-- | src/mds-server.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mds-server.c b/src/mds-server.c index 6476fb5..932e7ea 100644 --- a/src/mds-server.c +++ b/src/mds-server.c @@ -785,13 +785,10 @@ void add_intercept_condition(client_t* client, char* condition, int64_t priority client->interception_conditions = NULL; } else - { - conds = realloc(conds, n * sizeof(interception_condition_t)); - if (conds == NULL) - perror(*argv); - else - client->interception_conditions = conds; - } + if ((conds = realloc(conds, n * sizeof(interception_condition_t))) == NULL) + perror(*argv); + else + client->interception_conditions = conds; } else { @@ -1462,8 +1459,7 @@ int unmarshal_server(int fd) if (value->interception_conditions != NULL) { for (j = 0; j < n; j++) - if (value->interception_conditions[j].condition != NULL) - free(value->interception_conditions[j].condition); + free(value->interception_conditions[j].condition); free(value->interception_conditions); } free(value); |