title: When to use drmModeFreeResources after a drmModeGetResources?
body: <p>If I'm working with drm on linux and trying to get the number of displays/connectors on a gpu, when do I need to call drmModeFreeResources/Connector?</p>
  
  <pre><code>drmModeResPtr drmResources = drmModeGetResources(drmFd);
  
  for (int i = 0; i &lt; drmResources-&gt;count_connectors; i++) {
      drmModeConnectorPtr connector;
      connector = drmModeGetConnector(drmFd, drmResources-&gt;connectors[i]);
      if (connector &amp;&amp; connector-&gt;connection == DRM_MODE_CONNECTED) {
          do_something();
      }
      drmModeFreeConnector(connector); // Do I need to do this?
  }
  drmModeFreeResources(drmResources); // Do I need to do this?
  </code></pre>
  
  <p>Do I need to free every time I get resources/connector? Or do I only need to do it after I'm done with the resources and want to destroy them, such as when the connector or display is no longer connected? </p>
  
  <p>Thanks</p>