Unchecked return values in SLAPI plugins

Return values weren't checked in several cases which could
have lead to unhandled errors.

https://fedorahosted.org/freeipa/ticket/722
This commit is contained in:
Martin Kosek
2011-01-14 10:24:04 +01:00
committed by Simo Sorce
parent a6a91e5dbc
commit c94d20cfd8
4 changed files with 20 additions and 8 deletions

View File

@@ -748,8 +748,8 @@ static int ipamodrdn_post_op(Slapi_PBlock *pb)
Slapi_Value *val;
const char *strval;
slapi_attr_first_value(sattr, &val);
if (!val) {
ret = slapi_attr_first_value(sattr, &val);
if (ret == -1 || !val) {
LOG_FATAL("Source attr %s is empty\n", cfgentry->sattr);
continue;
}