summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/libwbclient/wbclient.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/nsswitch/libwbclient/wbclient.c b/nsswitch/libwbclient/wbclient.c
index 9a1e770690..b521567c90 100644
--- a/nsswitch/libwbclient/wbclient.c
+++ b/nsswitch/libwbclient/wbclient.c
@@ -137,24 +137,17 @@ void wbcFreeMemory(void *p)
wbcErr wbcLibraryDetails(struct wbcLibraryDetails **_details)
{
- wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
struct wbcLibraryDetails *info;
info = talloc(NULL, struct wbcLibraryDetails);
- BAIL_ON_PTR_ERROR(info, wbc_status);
+ if (info == NULL) {
+ return WBC_ERR_NO_MEMORY;
+ }
info->major_version = WBCLIENT_MAJOR_VERSION;
info->minor_version = WBCLIENT_MINOR_VERSION;
- info->vendor_version = talloc_strdup(info,
- WBCLIENT_VENDOR_VERSION);
- BAIL_ON_PTR_ERROR(info->vendor_version, wbc_status);
+ info->vendor_version = WBCLIENT_VENDOR_VERSION;
*_details = info;
- info = NULL;
-
- wbc_status = WBC_ERR_SUCCESS;
-
-done:
- talloc_free(info);
- return wbc_status;
+ return WBC_ERR_SUCCESS;
}