Hi Eric, On 28 June 2018 at 11:21, Eric Engestrom <eric@xxxxxxxxxxxx> wrote: >> @@ -2992,16 +2992,37 @@ static int drmParseSubsystemType(int maj, int min) >> #endif >> } >> >> +static char * >> +get_real_pci_path(int maj, int min) >> +{ >> + char path[PATH_MAX + 1]; >> + char *real_path = malloc(PATH_MAX); > > Why not allocate this on the stack and pass it in? > It would avoid the error handling you had to add in this patch :) > As always, thanks for having a look. I was mostly hesitant since some callers already have a char foo[PATH_MAX +1]. Thinking about it - the default stack size should be enough to accommodate an extra ~4k bytes. Will fix. Thanks Emil _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel