Changeset 228 for branches/samba-3.2.x/source/nsswitch/libwbclient
- Timestamp:
- May 26, 2009, 9:44:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/nsswitch/libwbclient/wbc_sid.c
r141 r228 41 41 int i; 42 42 char *tmp = NULL; 43 TALLOC_CTX *ctx = NULL;44 43 45 44 if (!sid) { … … 47 46 BAIL_ON_WBC_ERROR(wbc_status); 48 47 } 49 50 ctx = talloc_init("wbcSidToString");51 BAIL_ON_PTR_ERROR(ctx, wbc_status);52 48 53 49 id_auth = sid->id_auth[5] + … … 56 52 (sid->id_auth[2] << 24); 57 53 58 tmp = talloc_asprintf( ctx, "S-%d-%d", sid->sid_rev_num, id_auth);54 tmp = talloc_asprintf(NULL, "S-%d-%d", sid->sid_rev_num, id_auth); 59 55 BAIL_ON_PTR_ERROR(tmp, wbc_status); 60 56 … … 67 63 } 68 64 69 *sid_string =talloc_strdup(NULL, tmp);70 BAIL_ON_PTR_ERROR((*sid_string), wbc_status);65 *sid_string = tmp; 66 tmp = NULL; 71 67 72 68 wbc_status = WBC_ERR_SUCCESS; 73 69 74 70 done: 75 talloc_free( ctx);71 talloc_free(tmp); 76 72 77 73 return wbc_status;
Note:
See TracChangeset
for help on using the changeset viewer.