aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-07-19 17:59:00 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-07-19 17:59:00 +0200
commitb4fc89bfcf8902037e9a9c6759ae47a68e2dc44a (patch)
tree285991ced337484687a810127e16e18bf5c924ba
parentcae1b7c960f28b0fdb90a08a131e25051914b55f (diff)
smatch: Check the client->device variable
This is fixing: src/osmo_client_core.c +105 osmo_client_capture(8) warn: variable dereferenced before check 'client'
-rw-r--r--src/osmo_client_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo_client_core.c b/src/osmo_client_core.c
index 0b45480..c8bd8bd 100644
--- a/src/osmo_client_core.c
+++ b/src/osmo_client_core.c
@@ -102,7 +102,7 @@ int osmo_client_capture(struct osmo_pcap_client *client, const char *device)
free_all(client);
client->device = talloc_strdup(client, device);
- if (!client) {
+ if (!client->device) {
LOGP(DCLIENT, LOGL_ERROR, "Failed to copy string.\n");
return 1;
}