bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #18804] -[NSURLHandle resourceData] fails to retain & autorelease i


From: Larry Campbell
Subject: [bug #18804] -[NSURLHandle resourceData] fails to retain & autorelease its returned value
Date: Tue, 16 Jan 2007 18:29:16 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3

URL:
  <http://savannah.gnu.org/bugs/?18804>

                 Summary: -[NSURLHandle resourceData] fails to retain &
autorelease its returned value
                 Project: GNUstep
            Submitted by: lcampbel
            Submitted on: Tuesday 01/16/2007 at 18:29
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

-[NSURLHandle resourceData] should always retain & autorelease its returned
value; otherwise, releasing the handle will deallocate the data.

The fix: in NSURLHandle.m, at line 541 (wrt gnustep-base 1.13.0), change
this:

      if (d != nil)
        {
          ASSIGNCOPY(_data, d);
        }
      return _data;


to this:

      if (d != nil)
        {
          ASSIGNCOPY(_data, d);
        }
      return AUTORELEASE([_data copy]);





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?18804>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]