On Sat, Jun 28, 2014 at 9:47 PM, René Scharfe <l.s.r@xxxxxx> wrote: > - sprintf(path, "%s/pack", objdir); > - len = strlen(path); > - dir = opendir(path); > + strbuf_addstr(&path, objdir); > + strbuf_addstr(&path, "/pack"); > + dir = opendir(path.buf); > if (!dir) { > if (errno != ENOENT) > error("unable to open object pack directory: %s: %s", > - path, strerror(errno)); > + path.buf, strerror(errno)); > return; Memory leak. The rest looks good. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html