-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plug leak of ppdb_filename #14541
Plug leak of ppdb_filename #14541
Conversation
mono_image_open_metadata_only and its callees all dupe the filename string, so free the string after mono_image_open_metadata_only is done with it: ``` 1 (128 bytes) ROOT LEAK: 0x7fb07f086c80 [128] length: 105 "/Users/therzok/Work/md/md-addins/external-addins/MonoDevelop.MonoDroid/build/Xamarin.Installer.Common.pdb" ```
@@ -154,8 +154,7 @@ mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size) | |||
} | |||
|
|||
ppdb_image = mono_image_open_metadata_only (ppdb_filename, &status); | |||
if (!ppdb_image) | |||
g_free (ppdb_filename); | |||
g_free (ppdb_filename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to move the definition of ppdb_filename
into that else
clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to avoid cosmetic changes :D
Several lanes all failing in
Error Message System.Net.WebException : The remote server returned an error: (429) Too Many Requests. Stacktrace at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x00146] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/System.Net/HttpWebRequest.cs:1101 at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000e8] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/System.Net/HttpWebRequest.cs:956 at System.Net.HttpWebRequest.GetResponse () [0x0000f] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/System.Net/HttpWebRequest.cs:1218 at System.Net.WebClient.GetWebResponse (System.Net.WebRequest request) [0x00000] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:249 at System.Net.WebClient.DownloadBits (System.Net.WebRequest request, System.IO.Stream writeStream) [0x000e6] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:850 at System.Net.WebClient.DownloadFile (System.Uri address, System.String fileName) [0x00088] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:329 at System.Net.WebClient.DownloadFile (System.String address, System.String fileName) [0x00000] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/external/corefx/src/System.Net.WebClient/src/System/Net/WebClient.cs:308 at (wrapper remoting-invoke-with-check) System.Net.WebClient.DownloadFile(string,string) at MonoTests.System.Net.WebClientTest.DownloadTwice () [0x0000b] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/System/Test/System.Net/WebClientTest.cs:38 at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&) at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395 |
@monojenkins build failed |
Anything else needed? |
mono_image_open_metadata_only and its callees all dupe the filename string, so free the string after mono_image_open_metadata_only is done with it: