Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1043

phongo_execute_query() may leak cursor struct on error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.3.2
    • Fix Version/s: 1.4.0-beta1, 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      phongo_execute_query() may have two possible leaks in the following code blocks:

      if (server_id > 0 && !mongoc_cursor_set_hint(cursor, server_id)) {
      	phongo_throw_exception(PHONGO_ERROR_MONGOC_FAILED TSRMLS_CC, "%s", "Could not set cursor server_id");
      	/* THIS MAY LEAK */
      	return false;
      }
      

        Attachments

          Activity

            People

            Assignee:
            derick Derick Rethans
            Reporter:
            jmikola Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: