dtinfo: fix coverity issues related to null checks after dereference

This commit is contained in:
Peter Howkins
2018-04-04 22:42:06 +01:00
parent 2b15c4057e
commit bc28c20524
6 changed files with 24 additions and 22 deletions

View File

@@ -530,8 +530,7 @@ highlight_search_hit(_DtCvSegment* seg, unsigned int vcc, unsigned int len)
}
DtCvStrVcLenSync(seg);
if (sibling->handle.string.string)
free (sibling->handle.string.string);
free (sibling->handle.string.string);
if (sibling->client_use) {
delete (SegClientData*)sibling->client_use;
sibling->client_use = NULL;

View File

@@ -129,8 +129,7 @@ build_bc_url(UAS_String bookcase_path)
fprintf(stderr, "(DEBUG) URL=\"%s\"\n", (char*)bc_locator);
#endif
if (bc_path)
free(bc_path);
free(bc_path);
return bc_locator;
}