shithub: unionfs

Download patch

ref: f784be8431711c15cbc1f0a60168303a6764405d
parent: d1ef6ca8b03b6b387fd5594d6f9cab2a2ea2b157
author: kvik <kvik@a-b.xyz>
date: Mon May 13 18:46:22 EDT 2019

plug a leak

tentative. the whole finding a suitable
path thing should be made into a function.

--- a/unionfs.c
+++ b/unionfs.c
@@ -489,8 +489,10 @@
 	assert(u != unionlist);
 	path = mkpath(u->root, f->fspath, nil);
 	d = dirstat(path);
-	if(d != nil)
+	if(d != nil){
+		free(d);
 		goto work;
+	}
 	for(u = unionlist->next; u != unionlist; u = u->next){
 		if(u->create == 1)
 			continue;