[MPlayer-dev-eng] [PATCH] mplayer memory leaks

Alexander Strasser eclipse7 at gmx.net
Thu Jul 22 09:51:44 CEST 2004


Hi Attila,
On Thu, Jul 22, 2004 at 04:19:21PM +0900, attila wrote:
> On Wed, Jul 21, 2004 at 03:16:24PM +0200, Alexander Strasser wrote:
> > As a second step i wrote a little src documentation for
> > get_path() also attached.
> 
> > + * Return Values:
> > + *   Returns the pointer to the ALLOCATED buffer containing the
> > + *   zero terminated path string. This string has to be FREED
> > + *   in the callers scope.
> 
> Small rewording:
> 
> "This string has to be freed by the caller"
> 
> "scope" is here rather confusing then helping
I don't think that scope ist fully wrong, but you are right it is
too confusing in this context. I also made another error and wrote
string in the last scentence, that should better be called buffer.

I attached a corrected version.

  Alex (beastd)
-------------- next part --------------
Index: get_path.c
===================================================================
RCS file: /cvsroot/mplayer/main/get_path.c,v
retrieving revision 1.6
diff -u -r1.6 get_path.c
--- get_path.c	30 Apr 2004 16:56:00 -0000	1.6
+++ get_path.c	19 Jul 2004 16:13:16 -0000
@@ -1,4 +1,13 @@
 
+/*
+ * Get path to config dir/file.
+ *
+ * Return Values:
+ *   Returns the pointer to the ALLOCATED buffer containing the
+ *   zero terminated path string. This buffer has to be FREED
+ *   by the caller.
+ *
+ */
 char *get_path(char *filename){
 	char *homedir;
 	char *buff;


More information about the MPlayer-dev-eng mailing list