Michał Górny <[email protected]> writes:

> Does it? Well, I didn't put much effort into that since the existing
> code was just dumb enough to allocate-and-replace the struct when
> defined multiple times.

These two pieces will drop memory on the floor if invoked twice. Just
calling free before the assignment should be fine as the struct is
calloc'd. 

        case LOGFILEPATH:
            if (xf86getSubToken(&(ptr->file_comment)) != STRING)
                Error(QUOTE_MSG, "LogFile");
            ptr->file_logfile = xf86_lex_val.str;
            break;
        case XKBDIR:
            if (xf86getSubToken(&(ptr->file_xkbdir)) != STRING)

This should be file_comment, not file_xkbdir.

                Error(QUOTE_MSG, "XkbDir");
            ptr->file_xkbdir = xf86_lex_val.str;
            break;

-- 
-keith

Attachment: signature.asc
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to