diff options
author | Volker Lendecke <vl@samba.org> | 2010-01-23 19:26:51 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-24 14:52:33 +0100 |
commit | 5a313731f3960120c08a06f2c9e9f6ea56ed9f6f (patch) | |
tree | 06e153140ae65444734db2f56bb5910e3590ba3b | |
parent | d69d07ce62f2cb9468caf8d1a1dddc8082e0d492 (diff) | |
download | samba-5a313731f3960120c08a06f2c9e9f6ea56ed9f6f.tar.gz samba-5a313731f3960120c08a06f2c9e9f6ea56ed9f6f.tar.bz2 samba-5a313731f3960120c08a06f2c9e9f6ea56ed9f6f.zip |
libwbclient: Remove a pointless talloc_strdup
-rw-r--r-- | nsswitch/libwbclient/wbclient.c | 17 |
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; } |