-
Notifications
You must be signed in to change notification settings - Fork 52
Commit 3ac0b2a
OIDs: Copy constructor take ownership
When constructing via a the cpy parameter, cpy
would maintain ownership; if cpy._free_on_dealloc
was set to true, the new object could have memory
freed while still maintaining a reference to it.
This fixes the issue by having the new object take
ownership. To perform a memory copy, use the elements
argument to the constructor.
Signed-off-by: Alexander Scheel <ascheel@redhat.com>1 parent 5f213d8 commit 3ac0b2a
1 file changed
+9
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
35 | 41 |
| |
36 | 42 |
| |
37 | 43 |
| |
38 | 44 |
| |
39 | 45 |
| |
46 | + | ||
47 | + | ||
48 | + | ||
40 | 49 |
| |
41 | 50 |
| |
42 | 51 |
| |
|
0 commit comments