diff options
author | Volker Lendecke <vl@samba.org> | 2010-04-03 11:59:29 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-19 14:27:16 +0200 |
commit | a0162303c6e23c8f1d72a0e788d2665a97d16b4b (patch) | |
tree | a3553322450ac6b032881eb16ec47dde0c3b2812 /nsswitch/libwbclient/wbclient.c | |
parent | ed1981db05af87a48b17866b7e886d1e25fa8f77 (diff) | |
download | samba-a0162303c6e23c8f1d72a0e788d2665a97d16b4b.tar.gz samba-a0162303c6e23c8f1d72a0e788d2665a97d16b4b.tar.bz2 samba-a0162303c6e23c8f1d72a0e788d2665a97d16b4b.zip |
libwbclient: Add wbcStrDup
Diffstat (limited to 'nsswitch/libwbclient/wbclient.c')
-rw-r--r-- | nsswitch/libwbclient/wbclient.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/wbclient.c b/nsswitch/libwbclient/wbclient.c index ea6c24ccc3..99248710e6 100644 --- a/nsswitch/libwbclient/wbclient.c +++ b/nsswitch/libwbclient/wbclient.c @@ -205,6 +205,20 @@ void wbcFreeMemory(void *p) return; } +char *wbcStrDup(const char *str) +{ + char *result; + size_t len; + + len = strlen(str); + result = (char *)wbcAllocateMemory(len+1, sizeof(char), NULL); + if (result == NULL) { + return NULL; + } + memcpy(result, str, len+1); + return result; +} + wbcErr wbcLibraryDetails(struct wbcLibraryDetails **_details) { struct wbcLibraryDetails *info; |