dbuf = tdb_fetch(posix_pending_close_tdb, kbuf);
- tp = Realloc(dbuf.dptr, dbuf.dsize + sizeof(int));
+ tp = SMB_REALLOC(dbuf.dptr, dbuf.dsize + sizeof(int));
if (!tp) {
DEBUG(0,("add_fd_to_close_entry: Realloc fail !\n"));
SAFE_FREE(dbuf.dptr);
pl.size = size;
pl.lock_type = lock_type;
- tp = Realloc(dbuf.dptr, dbuf.dsize + sizeof(pl));
+ tp = SMB_REALLOC(dbuf.dptr, dbuf.dsize + sizeof(pl));
if (!tp) {
DEBUG(0,("add_posix_lock_entry: Realloc fail !\n"));
goto fail;
| l_curr| | l_new |
+-------+ +---------+
**********************************************/
- struct lock_list *l_new = (struct lock_list *)talloc(ctx,
- sizeof(struct lock_list));
+ struct lock_list *l_new = TALLOC_P(ctx, struct lock_list);
if(l_new == NULL) {
DEBUG(0,("posix_lock_list: talloc fail.\n"));
return True; /* Not a fatal error. */
}
- if ((ll = (struct lock_list *)talloc(l_ctx, sizeof(struct lock_list))) == NULL) {
+ if ((ll = TALLOC_P(l_ctx, struct lock_list)) == NULL) {
DEBUG(0,("set_posix_lock: unable to talloc unlock list.\n"));
talloc_destroy(l_ctx);
return True; /* Not a fatal error. */
return True; /* Not a fatal error. */
}
- if ((ul = (struct lock_list *)talloc(ul_ctx, sizeof(struct lock_list))) == NULL) {
+ if ((ul = TALLOC_P(ul_ctx, struct lock_list)) == NULL) {
DEBUG(0,("release_posix_lock: unable to talloc unlock list.\n"));
talloc_destroy(ul_ctx);
return True; /* Not a fatal error. */