summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-23 19:26:51 +0100
committerVolker Lendecke <vl@samba.org>2010-01-24 14:52:33 +0100
commit5a313731f3960120c08a06f2c9e9f6ea56ed9f6f (patch)
tree06e153140ae65444734db2f56bb5910e3590ba3b /nsswitch/libwbclient
parentd69d07ce62f2cb9468caf8d1a1dddc8082e0d492 (diff)
downloadsamba-5a313731f3960120c08a06f2c9e9f6ea56ed9f6f.tar.gz
samba-5a313731f3960120c08a06f2c9e9f6ea56ed9f6f.tar.bz2
samba-5a313731f3960120c08a06f2c9e9f6ea56ed9f6f.zip
libwbclient: Remove a pointless talloc_strdup
Diffstat (limited to 'nsswitch/libwbclient')
-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;
}