This piece of code is problematic since it creates a pointer to a local variable (allocated on the stack) and passes it to a function after the stack frame has been released. It can only work by chance. Here is the info from Coverity scan static code analysis.
https://github.com/MolSSI-MDI/MDI_Library/blob/54a477c3ab067384916059b5cc8b881b24babeff/MDI_Library/mdi.c#L2126
This piece of code is problematic since it creates a pointer to a local variable (allocated on the stack) and passes it to a function after the stack frame has been released. It can only work by chance. Here is the info from Coverity scan static code analysis.