From e7bb933477f7cd3b6cb160776acd1e706b256af9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 9 Jan 2012 22:02:10 +0000 Subject: [PATCH] fix nasty memory-related crashes caused by not noticing a bug in getmntinfo() on OS X, which disallows free()-ing memory allocated by that function git-svn-id: svn://localhost/ardour2/branches/3.0@11211 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/pbd/mountpoint.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/pbd/mountpoint.cc b/libs/pbd/mountpoint.cc index 3cc94638a3..045e815282 100644 --- a/libs/pbd/mountpoint.cc +++ b/libs/pbd/mountpoint.cc @@ -147,7 +147,11 @@ mountpoint (string path) } } - free(mntbufp); + /* From the manpage, under "BUGS" : "The memory allocated by getmntinfo() cannot be free(3)'d by the + application." + + free(mntbufp); + */ return best; }