mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 22:34:41 +00:00
storage: Resource leak
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
This commit is contained in:
parent
fbab55f369
commit
6666b28fbc
@ -93,8 +93,10 @@ char *dir_new_path(char *src, const char *oldname, const char *name,
|
|||||||
|
|
||||||
/* copy text up to oldname */
|
/* copy text up to oldname */
|
||||||
retlen = strlcpy(p, src, p2 - src);
|
retlen = strlcpy(p, src, p2 - src);
|
||||||
if (retlen >= p2 - src)
|
if (retlen >= p2 - src) {
|
||||||
|
free(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* move target pointer (p) */
|
/* move target pointer (p) */
|
||||||
p += p2 - src;
|
p += p2 - src;
|
||||||
|
Loading…
Reference in New Issue
Block a user