From b4fc89bfcf8902037e9a9c6759ae47a68e2dc44a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 19 Jul 2011 17:59:00 +0200 Subject: 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' --- src/osmo_client_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3