linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs-tools: fixed incorrect error handling
@ 2023-11-20  6:55 Maxim Korotkov
  2023-11-20  7:55 ` [f2fs-dev] [PATCH v2] " Maxim Korotkov
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Korotkov @ 2023-11-20  6:55 UTC (permalink / raw)
  To: Aravind Ramesh; +Cc: Jaegeuk Kim, Maxim Korotkov, linux-f2fs-devel

diff --git a/lib/libf2fs_zoned.c b/lib/libf2fs_zoned.c
index 56c97d1..81088af 100644
--- a/lib/libf2fs_zoned.c
+++ b/lib/libf2fs_zoned.c
@@ -293,6 +293,7 @@ int f2fs_check_zones(int j)
 
 	dev->zone_cap_blocks = malloc(dev->nr_zones * sizeof(size_t));
 	if (!dev->zone_cap_blocks) {
+		free(rep);
 		ERR_MSG("No memory for zone capacity list.\n");
 		return -ENOMEM;
 	}
-- 
2.34.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-28  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20  6:55 [f2fs-dev] [PATCH] f2fs-tools: fixed incorrect error handling Maxim Korotkov
2023-11-20  7:55 ` [f2fs-dev] [PATCH v2] " Maxim Korotkov
2023-11-28  6:24   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).