summaryrefslogtreecommitdiff
path: root/navit/osd.c
diff options
context:
space:
mode:
authorwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>2015-04-13 20:10:07 +0000
committerwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>2015-04-13 20:10:07 +0000
commit40cf635d3b3a3b9cdc0ae08a6ecca9197b925215 (patch)
tree92e1261b6417f2dbb8671c90a45e4265b0f1a5a1 /navit/osd.c
parentc98452c4ff079c86bef5cd3142735475bfcbe6a2 (diff)
downloadnavit-40cf635d3b3a3b9cdc0ae08a6ecca9197b925215.tar.gz
Fix:osd: use early return for osd_destory when the osd is null, found be coverity
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@6076 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/osd.c')
-rw-r--r--navit/osd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/navit/osd.c b/navit/osd.c
index d0e88d159..4d5527b86 100644
--- a/navit/osd.c
+++ b/navit/osd.c
@@ -105,9 +105,10 @@ osd_set_attr(struct osd *osd, struct attr* attr)
static void
osd_destroy(struct osd *osd)
{
- if (osd && osd->meth.destroy) {
+ if (!osd)
+ return;
+ if (osd->meth.destroy)
osd->meth.destroy(osd->priv);
- }
attr_list_free(osd->attrs);
g_free(osd);
}