SF.net SVN: supercollider:[9096] trunk/Source/app/CocoaBridgePrimitives.M

View: New views
1 Messages — Rating Filter:   Alert me  

SF.net SVN: supercollider:[9096] trunk/Source/app/CocoaBridgePrimitives.M

by thelych-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Revision: 9096
          http://supercollider.svn.sourceforge.net/supercollider/?rev=9096&view=rev
Author:   thelych
Date:     2009-04-21 20:51:39 +0000 (Tue, 21 Apr 2009)

Log Message:
-----------
fixing possible memory leaks if ObjcTypeFillPyrSlot fails to find a proper conversion for an Objective-C type

Modified Paths:
--------------
    trunk/Source/app/CocoaBridgePrimitives.M

Modified: trunk/Source/app/CocoaBridgePrimitives.M
===================================================================
--- trunk/Source/app/CocoaBridgePrimitives.M 2009-04-21 20:15:13 UTC (rev 9095)
+++ trunk/Source/app/CocoaBridgePrimitives.M 2009-04-21 20:51:39 UTC (rev 9096)
@@ -1342,6 +1342,7 @@
 
  if(ObjcTypeFillPyrSlot(&retslot, cType, retval, &convertedObject) != noErr) {
  post("ERROR: CocoaBridge returned object type: %c is not-of-type _C_ID !\n", *cType);
+ if(retval) free(retval);
  return errFailed;
  }
 
@@ -1693,6 +1694,7 @@
 
  if(ObjcTypeFillPyrSlot(receiver, cType, retval, &convertedObject) != noErr) {
  post("ERROR: CocoaBridge returned object type: %c is not-of-type _C_ID !\n", *cType);
+ if(retval) free(retval);
  return errFailed;
  }
  }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/