title: How to resolve this memory leak?
body: <p>I obtained the following code from the servin.com website. Although the code works, Instruments reports a memory leak. I don't see any alloc, retain, copy in the code so I cannot figure out how to resolve this memory leak. The code &amp; results from Instruments are below. Any help would be appreciated. </p>
  
  <pre><code>// Part 1 - Create Internet socket addr of zero
  struct sockaddr_in zeroAddr;
  bzero(&amp;zeroAddr, sizeof(zeroAddr));
  zeroAddr.sin_len = sizeof(zeroAddr);
  zeroAddr.sin_family = AF_INET;
  
  // Part 2- Create target in format need by SCNetwork
  SCNetworkReachabilityRef target = 
  SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *) &amp;zeroAddr);
  
  // Part 3 - Get the flags
  SCNetworkReachabilityFlags flags;
  SCNetworkReachabilityGetFlags(target, &amp;flags);
  
  // Part 4 - Create output
  NSString *sNetworkReachable;
  if (flags &amp; kSCNetworkFlagsReachable)
      sNetworkReachable = @"YES";
  else
      sNetworkReachable = @"NO";
  
  NSString *sCellNetwork;
  if (flags &amp; kSCNetworkReachabilityFlagsIsWWAN)
      sCellNetwork = @"YES";
  else
      sCellNetwork = @"NO";
  
  
  NSLog (@"Network Reachable: %@", sNetworkReachable);
  NSLog (@"Cell Network: %@", sCellNetwork);
  </code></pre>
  
  <p>Results from Instruments...</p>
  
  <p>Leaked Object - # - Address - Size - Responsible Library - Responsible Frame</p>
  
  <p>Malloc 16 Bytes - 1 - 0x5141d50 - 16 Bytes - SystemConfiguration - SCNetworkReachabilityCreateWithAddress</p>
  
  <p>SCNetworkReachability - 1 - 0x51347b0 - 288 Bytes - SystemConfiguration - SCNetworkReachabilityCreateWithAddress</p>