Resolve some coverity warnings

This commit is contained in:
Peter Howkins
2018-03-08 23:03:21 +00:00
parent 35a16f47df
commit 637abd5d5c
10 changed files with 89 additions and 50 deletions

View File

@@ -85,8 +85,11 @@ _DtCmIsSameUser(char *user1, char *user2)
str1 = _DtCmGetPrefix(user1, '@');
str2 = _DtCmGetPrefix(user2, '@');
if (str1 == NULL || str2 == NULL)
if (str1 == NULL || str2 == NULL) {
free(str1);
free(str2);
return (B_FALSE);
}
if (strcmp(str1, str2)) {
free(str1);