diff options
| author | Mattias Andrée <maandree@operamail.com> | 2014-05-07 22:19:45 +0200 | 
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2014-05-07 22:19:45 +0200 | 
| commit | ec7d302d1243df0e252d54a940e47f9d91784d66 (patch) | |
| tree | 97836ce0c99191e08487cd01ff1ec649683db287 /src/mds-server.c | |
| parent | m (diff) | |
| download | mds-ec7d302d1243df0e252d54a940e47f9d91784d66.tar.gz mds-ec7d302d1243df0e252d54a940e47f9d91784d66.tar.bz2 mds-ec7d302d1243df0e252d54a940e47f9d91784d66.tar.xz | |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-server.c')
| -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); | 
