Uploaded image for project: 'Kopano Groupware Core'
  1. Kopano Groupware Core
  2. KC-72

search memory leak

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.1.0, 8.1.0 beta1
    • Component/s: None
    • Security Level: Public

      Description

      the following piece of code in swig/python/conversion.cpp causes MVProps to end up with a refcount of 2, so it's never released. just adding a Py_DECREF here should take care of the problem.

      PyObject *Object_from_LPECUSER(ECUSER *lpUser, ULONG ulFlags)

      { >-------PyObject *MVProps = Object_from_MVPROPMAP(lpUser->sMVPropmap, ulFlags); >-------// XXX: Caller should DECREF List? >-------if (ulFlags & MAPI_UNICODE) >------->-------return PyObject_CallFunction(PyTypeECUser, "(uuuuulllls#O)", lpUser->lpszUsername, lpUser->lpszPassword, lpUser->lpszMailAddress, lpUser->lpszFullName, lpUser->lpszServername, lpUser->ulObjClass, lpUser->ulIsAdmin, lpUser->ulIsABHidden, lpUser->ulCapacity, lpUser->sUserId.lpb, lpUser->sUserId.cb, MVProps); >-------else >------->-------return PyObject_CallFunction(PyTypeECUser, "(ssssslllls#O)", lpUser->lpszUsername, lpUser->lpszPassword, lpUser->lpszMailAddress, lpUser->lpszFullName, lpUser->lpszServername, lpUser->ulObjClass, lpUser->ulIsAdmin, lpUser->ulIsABHidden, lpUser->ulCapacity, lpUser->sUserId.lpb, lpUser->sUserId.cb, MVProps); }

      so it returns from Object_from_MVPROPMAP with a refcount of 1, but is then added to an ECUser object, so the refcount becomes 2.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mdufour Mark Dufour
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: