phongo_execute_query() may leak cursor struct on error

XMLWordPrintableJSON

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

      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;
      }
      

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

                Created:
                Updated:
                Resolved: