<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - IOHIDDeviceClass::setElementDictIntValue() leaks memory"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=111561">111561</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>IOHIDDeviceClass::setElementDictIntValue() leaks memory
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0.0.0.alpha0+ Master
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Mac OS X (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>framework
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>iplaw67@tuta.io
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
When invoked

IOHIDDeviceClass::setElementDictIntValue() 

leaks memory quite substantially, as does :

IOHIDDeviceClass::createElement()

and these are invoked multiple times.


Steps to Reproduce:
1. Start XCode, then Instruments.app
2. Choose Memory Leak profile tool
3. Select LibreOffice.app in instdir as target process
4. Click on the record button, LODev is started by the profiling tool
5. Wait for the StartCenter to load - note the occurrences of memory leaks as
they occur.
6. Open a new Writer document.
7. When the document has loaded, click on the dropdown font list. Scroll up and
down the list with the Up/Down cursor arrows
8. Stop recording.
9. Analyse the profile trace.

Actual Results:  
It leaks memory

Expected Results:
It shouldn't leak memory


Reproducible: Always

User Profile Reset: No

Additional Info:
The responsible code seems to be here :


+0x09   pushq               %rax
+0x0a   movq                %rdx, %r14
+0x0d   movq                %rsi, %r15
+0x10   movl                %ecx, -28(%rbp)
+0x13   movq                37794(%rip), %rax
+0x1a   movq                (%rax), %rdi
+0x1d   leaq                -28(%rbp), %rdx
+0x21   movl                $9, %esi
+0x26   callq               "DYLD-STUB$$CFNumberCreate"
+0x2b   movq                %rax, %rbx
+0x2e   testq               %rbx, %rbx
+0x31   je                 
"IOHIDDeviceClass::setElementDictIntValue(__CFDictionary*, __CFString const*,
unsigned int)+0x49"
+0x33   movq                %r15, %rdi
+0x36   movq                %r14, %rsi
+0x39   movq                %rbx, %rdx
+0x3c   callq               "DYLD-STUB$$CFDictionarySetValue"
+0x41   movq                %rbx, %rdi
+0x44   callq               "DYLD-STUB$$CFRelease"
+0x49   addq                $8, %rsp
+0x4d   popq                %rbx
+0x4e   popq                %r14
+0x50   popq                %r15
+0x52   popq                %rbp
+0x53   retq



User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0)
Gecko/20100101 Firefox/54.0</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>