]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Use talloc_realloc instead of talloc_realloc_size
authorVolker Lendecke <vl@samba.org>
Fri, 4 Oct 2024 13:09:35 +0000 (15:09 +0200)
committerMartin Schwenke <martins@samba.org>
Sun, 6 Oct 2024 01:14:31 +0000 (01:14 +0000)
Maybe Coverity understands that talloc_realloc re-allocates the input
buf. It does not understand that talloc_realloc_size does it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
lib/util/util_paths.c

index b35cc7f5863b7968965d758e4c7c7642ac2dd2da..1685c3c3cbfa7669cde6eca030a8cbc21487f287 100644 (file)
@@ -95,7 +95,7 @@ static char *get_user_home_dir(TALLOC_CTX *mem_ctx)
                        goto done;
                }
                len = newlen;
-               tmp = talloc_realloc_size(mem_ctx, buf, len);
+               tmp = talloc_realloc(mem_ctx, buf, char, len);
                if (tmp == NULL) {
                        goto done;
                }