Coverage Report

Created: 2026-12-01 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/include/glib-2.0/glib/gmem.h
Line
Count
Source
1
/* GLIB - Library of useful routines for C programming
2
 * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
3
 *
4
 * SPDX-License-Identifier: LGPL-2.1-or-later
5
 *
6
 * This library is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU Lesser General Public
8
 * License as published by the Free Software Foundation; either
9
 * version 2.1 of the License, or (at your option) any later version.
10
 *
11
 * This library is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18
 */
19
20
/*
21
 * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
22
 * file for a list of people on the GLib Team.  See the ChangeLog
23
 * files for a list of changes.  These files are distributed with
24
 * GLib at ftp://ftp.gtk.org/pub/gtk/.
25
 */
26
27
#ifndef __G_MEM_H__
28
#define __G_MEM_H__
29
30
#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
31
#error "Only <glib.h> can be included directly."
32
#endif
33
34
#include <glib/gutils.h>
35
#include <glib/glib-typeof.h>
36
37
G_BEGIN_DECLS
38
39
/**
40
 * GMemVTable:
41
 * @malloc: function to use for allocating memory.
42
 * @realloc: function to use for reallocating memory.
43
 * @free: function to use to free memory.
44
 * @calloc: function to use for allocating zero-filled memory.
45
 * @try_malloc: function to use for allocating memory without a default error handler.
46
 * @try_realloc: function to use for reallocating memory without a default error handler.
47
 * 
48
 * A set of functions used to perform memory allocation. The same #GMemVTable must
49
 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
50
 * if it exists, should be prior to any use of GLib.
51
 *
52
 * This functions related to this has been deprecated in 2.46, and no longer work.
53
 */
54
typedef struct _GMemVTable GMemVTable;
55
56
57
#if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_LONG
58
/**
59
 * G_MEM_ALIGN:
60
 *
61
 * Indicates the number of bytes to which memory will be aligned on the
62
 * current platform.
63
 */
64
#  define G_MEM_ALIGN GLIB_SIZEOF_VOID_P
65
#else /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */
66
#  define G_MEM_ALIGN GLIB_SIZEOF_LONG
67
#endif  /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */
68
69
70
/* Memory allocation functions
71
 */
72
73
GLIB_AVAILABLE_IN_ALL
74
void     (g_free)         (gpointer      mem);
75
GLIB_AVAILABLE_IN_2_76
76
void     g_free_sized     (gpointer      mem,
77
                           size_t        size);
78
79
GLIB_AVAILABLE_IN_2_34
80
void     g_clear_pointer  (gpointer      *pp,
81
                           GDestroyNotify destroy);
82
83
GLIB_AVAILABLE_IN_ALL
84
gpointer g_malloc         (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
85
GLIB_AVAILABLE_IN_ALL
86
gpointer g_malloc0        (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
87
GLIB_AVAILABLE_IN_ALL
88
gpointer g_realloc        (gpointer  mem,
89
         gsize   n_bytes) G_GNUC_WARN_UNUSED_RESULT;
90
GLIB_AVAILABLE_IN_ALL
91
gpointer g_try_malloc     (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
92
GLIB_AVAILABLE_IN_ALL
93
gpointer g_try_malloc0    (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
94
GLIB_AVAILABLE_IN_ALL
95
gpointer g_try_realloc    (gpointer  mem,
96
         gsize   n_bytes) G_GNUC_WARN_UNUSED_RESULT;
97
98
GLIB_AVAILABLE_IN_ALL
99
gpointer g_malloc_n       (gsize   n_blocks,
100
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
101
GLIB_AVAILABLE_IN_ALL
102
gpointer g_malloc0_n      (gsize   n_blocks,
103
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
104
GLIB_AVAILABLE_IN_ALL
105
gpointer g_realloc_n      (gpointer  mem,
106
         gsize   n_blocks,
107
         gsize   n_block_bytes) G_GNUC_WARN_UNUSED_RESULT;
108
GLIB_AVAILABLE_IN_ALL
109
gpointer g_try_malloc_n   (gsize   n_blocks,
110
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
111
GLIB_AVAILABLE_IN_ALL
112
gpointer g_try_malloc0_n  (gsize   n_blocks,
113
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
114
GLIB_AVAILABLE_IN_ALL
115
gpointer g_try_realloc_n  (gpointer  mem,
116
         gsize   n_blocks,
117
         gsize   n_block_bytes) G_GNUC_WARN_UNUSED_RESULT;
118
119
GLIB_AVAILABLE_IN_2_72
120
gpointer g_aligned_alloc  (gsize         n_blocks,
121
                           gsize         n_block_bytes,
122
                           gsize         alignment) G_GNUC_WARN_UNUSED_RESULT G_GNUC_ALLOC_SIZE2(1,2);
123
GLIB_AVAILABLE_IN_2_72
124
gpointer g_aligned_alloc0 (gsize         n_blocks,
125
                           gsize         n_block_bytes,
126
                           gsize         alignment) G_GNUC_WARN_UNUSED_RESULT G_GNUC_ALLOC_SIZE2(1,2);
127
GLIB_AVAILABLE_IN_2_72
128
void     g_aligned_free   (gpointer      mem);
129
GLIB_AVAILABLE_IN_2_76
130
void     g_aligned_free_sized (gpointer  mem,
131
                               size_t    alignment,
132
                               size_t    size);
133
134
#if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58
135
#define g_clear_pointer(pp, destroy)                     \
136
4.15M
  G_STMT_START                                           \
137
4.15M
  {                                                      \
138
4.15M
    G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \
139
4.15M
    glib_typeof ((pp)) _pp = (pp);                       \
140
4.15M
    glib_typeof (*(pp)) _ptr = *_pp;                     \
141
4.15M
    *_pp = NULL;                                         \
142
4.15M
    if (_ptr)                                            \
143
4.15M
      (destroy) (_ptr);                                  \
144
4.15M
  }                                                      \
145
4.15M
  G_STMT_END                                             \
146
1.91M
  GLIB_AVAILABLE_MACRO_IN_2_34
147
#else /* __GNUC__ */
148
#define g_clear_pointer(pp, destroy) \
149
  G_STMT_START {                                                               \
150
    G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer));                       \
151
    /* Only one access, please; work around type aliasing */                   \
152
    union { char *in; gpointer *out; } _pp;                                    \
153
    gpointer _p;                                                               \
154
    /* This assignment is needed to avoid a gcc warning */                     \
155
    GDestroyNotify _destroy = (GDestroyNotify) (destroy);                      \
156
                                                                               \
157
    _pp.in = (char *) (pp);                                                    \
158
    _p = *_pp.out;                                                             \
159
    if (_p)                        \
160
      {                        \
161
        *_pp.out = NULL;                                                       \
162
        _destroy (_p);                                                         \
163
      }                                                                        \
164
  } G_STMT_END                                                                 \
165
  GLIB_AVAILABLE_MACRO_IN_2_34
166
#endif /* __GNUC__ */
167
168
169
#if G_GNUC_CHECK_VERSION (4, 1) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED)
170
171
#define g_free(mem)                                                            \
172
  (__builtin_object_size ((mem), 0) != ((size_t) - 1)) ?                       \
173
    g_free_sized (mem, __builtin_object_size ((mem), 0)) : (g_free) (mem)
174
175
#endif /* G_GNUC_CHECK_VERSION (4, 1) && && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED) */
176
177
/**
178
 * g_steal_pointer:
179
 * @pp: (not nullable): a pointer to a pointer
180
 *
181
 * Sets @pp to %NULL, returning the value that was there before.
182
 *
183
 * Conceptually, this transfers the ownership of the pointer from the
184
 * referenced variable to the "caller" of the macro (ie: "steals" the
185
 * reference).
186
 *
187
 * The return value will be properly typed, according to the type of
188
 * @pp.
189
 *
190
 * This can be very useful when combined with g_autoptr() to prevent the
191
 * return value of a function from being automatically freed.  Consider
192
 * the following example (which only works on GCC and clang):
193
 *
194
 * |[
195
 * GObject *
196
 * create_object (void)
197
 * {
198
 *   g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
199
 *
200
 *   if (early_error_case)
201
 *     return NULL;
202
 *
203
 *   return g_steal_pointer (&obj);
204
 * }
205
 * ]|
206
 *
207
 * It can also be used in similar ways for 'out' parameters and is
208
 * particularly useful for dealing with optional out parameters:
209
 *
210
 * |[
211
 * gboolean
212
 * get_object (GObject **obj_out)
213
 * {
214
 *   g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
215
 *
216
 *   if (early_error_case)
217
 *     return FALSE;
218
 *
219
 *   if (obj_out)
220
 *     *obj_out = g_steal_pointer (&obj);
221
 *
222
 *   return TRUE;
223
 * }
224
 * ]|
225
 *
226
 * In the above example, the object will be automatically freed in the
227
 * early error case and also in the case that %NULL was given for
228
 * @obj_out.
229
 *
230
 * Since: 2.44
231
 */
232
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
233
static inline gpointer
234
g_steal_pointer (gpointer pp)
235
35.7M
{
236
35.7M
  gpointer *ptr = (gpointer *) pp;
237
35.7M
  gpointer ref;
238
239
35.7M
  ref = *ptr;
240
35.7M
  *ptr = NULL;
241
242
35.7M
  return ref;
243
35.7M
}
fu-synaptics-cape-struct.c:g_steal_pointer
Line
Count
Source
235
105
{
236
105
  gpointer *ptr = (gpointer *) pp;
237
105
  gpointer ref;
238
239
105
  ref = *ptr;
240
105
  *ptr = NULL;
241
242
105
  return ref;
243
105
}
Unexecuted instantiation: fu-synaptics-cape-firmware.c:g_steal_pointer
fu-synaptics-cape-hid-firmware.c:g_steal_pointer
Line
Count
Source
235
105
{
236
105
  gpointer *ptr = (gpointer *) pp;
237
105
  gpointer ref;
238
239
105
  ref = *ptr;
240
105
  *ptr = NULL;
241
242
105
  return ref;
243
105
}
Unexecuted instantiation: fu-synaptics-cape-sngl-firmware.c:g_steal_pointer
Unexecuted instantiation: fwupd-bios-setting-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-client-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-codec-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-device-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-enums-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-error-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-plugin-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-release-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-remote-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-report-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-request-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-security-attr-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-common.c:g_steal_pointer
Unexecuted instantiation: fwupd-codec.c:g_steal_pointer
Unexecuted instantiation: fwupd-device.c:g_steal_pointer
Unexecuted instantiation: fwupd-error.c:g_steal_pointer
Unexecuted instantiation: fwupd-file-input-stream.c:g_steal_pointer
Unexecuted instantiation: fwupd-input-stream.c:g_steal_pointer
fwupd-memory-input-stream.c:g_steal_pointer
Line
Count
Source
235
799k
{
236
799k
  gpointer *ptr = (gpointer *) pp;
237
799k
  gpointer ref;
238
239
799k
  ref = *ptr;
240
799k
  *ptr = NULL;
241
242
799k
  return ref;
243
799k
}
Unexecuted instantiation: fwupd-stream-input-stream.c:g_steal_pointer
Unexecuted instantiation: fwupd-bios-setting.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-blob.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-file.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-item.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-array.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-common.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-node.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-object.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-parser.c:g_steal_pointer
Unexecuted instantiation: fwupd-security-attr.c:g_steal_pointer
Unexecuted instantiation: fwupd-release.c:g_steal_pointer
Unexecuted instantiation: fwupd-report.c:g_steal_pointer
Unexecuted instantiation: fwupd-request.c:g_steal_pointer
Unexecuted instantiation: fwupd-variant.c:g_steal_pointer
Unexecuted instantiation: fu-backend-struct.c:g_steal_pointer
Unexecuted instantiation: fu-cbor-struct.c:g_steal_pointer
Unexecuted instantiation: fu-crc-struct.c:g_steal_pointer
Unexecuted instantiation: fu-progress-struct.c:g_steal_pointer
Unexecuted instantiation: fu-common-struct.c:g_steal_pointer
fu-acpi-table-struct.c:g_steal_pointer
Line
Count
Source
235
2.33k
{
236
2.33k
  gpointer *ptr = (gpointer *) pp;
237
2.33k
  gpointer ref;
238
239
2.33k
  ref = *ptr;
240
2.33k
  *ptr = NULL;
241
242
2.33k
  return ref;
243
2.33k
}
Unexecuted instantiation: fu-cab-struct.c:g_steal_pointer
Unexecuted instantiation: fu-cfi-struct.c:g_steal_pointer
Unexecuted instantiation: fu-cfu-struct.c:g_steal_pointer
fu-cfu-firmware-struct.c:g_steal_pointer
Line
Count
Source
235
813k
{
236
813k
  gpointer *ptr = (gpointer *) pp;
237
813k
  gpointer ref;
238
239
813k
  ref = *ptr;
240
813k
  *ptr = NULL;
241
242
813k
  return ref;
243
813k
}
Unexecuted instantiation: fu-config-struct.c:g_steal_pointer
Unexecuted instantiation: fu-coswid-struct.c:g_steal_pointer
Unexecuted instantiation: fu-context-struct.c:g_steal_pointer
Unexecuted instantiation: fu-device-struct.c:g_steal_pointer
fu-dfu-firmware-struct.c:g_steal_pointer
Line
Count
Source
235
2.67k
{
236
2.67k
  gpointer *ptr = (gpointer *) pp;
237
2.67k
  gpointer ref;
238
239
2.67k
  ref = *ptr;
240
2.67k
  *ptr = NULL;
241
242
2.67k
  return ref;
243
2.67k
}
Unexecuted instantiation: fu-dpaux-struct.c:g_steal_pointer
Unexecuted instantiation: fu-dump-struct.c:g_steal_pointer
fu-edid-struct.c:g_steal_pointer
Line
Count
Source
235
1.08k
{
236
1.08k
  gpointer *ptr = (gpointer *) pp;
237
1.08k
  gpointer ref;
238
239
1.08k
  ref = *ptr;
240
1.08k
  *ptr = NULL;
241
242
1.08k
  return ref;
243
1.08k
}
fu-efi-struct.c:g_steal_pointer
Line
Count
Source
235
1.21M
{
236
1.21M
  gpointer *ptr = (gpointer *) pp;
237
1.21M
  gpointer ref;
238
239
1.21M
  ref = *ptr;
240
1.21M
  *ptr = NULL;
241
242
1.21M
  return ref;
243
1.21M
}
fu-elf-struct.c:g_steal_pointer
Line
Count
Source
235
5.51M
{
236
5.51M
  gpointer *ptr = (gpointer *) pp;
237
5.51M
  gpointer ref;
238
239
5.51M
  ref = *ptr;
240
5.51M
  *ptr = NULL;
241
242
5.51M
  return ref;
243
5.51M
}
fu-fdt-struct.c:g_steal_pointer
Line
Count
Source
235
63.9k
{
236
63.9k
  gpointer *ptr = (gpointer *) pp;
237
63.9k
  gpointer ref;
238
239
63.9k
  ref = *ptr;
240
63.9k
  *ptr = NULL;
241
242
63.9k
  return ref;
243
63.9k
}
Unexecuted instantiation: fu-fw-upload-struct.c:g_steal_pointer
Unexecuted instantiation: fu-firmware-struct.c:g_steal_pointer
fu-fmap-struct.c:g_steal_pointer
Line
Count
Source
235
95.6k
{
236
95.6k
  gpointer *ptr = (gpointer *) pp;
237
95.6k
  gpointer ref;
238
239
95.6k
  ref = *ptr;
240
95.6k
  *ptr = NULL;
241
242
95.6k
  return ref;
243
95.6k
}
Unexecuted instantiation: fu-hid-struct.c:g_steal_pointer
fu-ifd-struct.c:g_steal_pointer
Line
Count
Source
235
3.72k
{
236
3.72k
  gpointer *ptr = (gpointer *) pp;
237
3.72k
  gpointer ref;
238
239
3.72k
  ref = *ptr;
240
3.72k
  *ptr = NULL;
241
242
3.72k
  return ref;
243
3.72k
}
fu-ifwi-struct.c:g_steal_pointer
Line
Count
Source
235
49.7k
{
236
49.7k
  gpointer *ptr = (gpointer *) pp;
237
49.7k
  gpointer ref;
238
239
49.7k
  ref = *ptr;
240
49.7k
  *ptr = NULL;
241
242
49.7k
  return ref;
243
49.7k
}
Unexecuted instantiation: fu-ihex-struct.c:g_steal_pointer
Unexecuted instantiation: fu-intel-me-struct.c:g_steal_pointer
Unexecuted instantiation: fu-intel-thunderbolt-struct.c:g_steal_pointer
Unexecuted instantiation: fu-io-channel-struct.c:g_steal_pointer
Unexecuted instantiation: fu-ioctl-struct.c:g_steal_pointer
Unexecuted instantiation: fu-heci-struct.c:g_steal_pointer
Unexecuted instantiation: fu-msgpack-struct.c:g_steal_pointer
fu-oprom-struct.c:g_steal_pointer
Line
Count
Source
235
1.69k
{
236
1.69k
  gpointer *ptr = (gpointer *) pp;
237
1.69k
  gpointer ref;
238
239
1.69k
  ref = *ptr;
240
1.69k
  *ptr = NULL;
241
242
1.69k
  return ref;
243
1.69k
}
Unexecuted instantiation: fu-path-struct.c:g_steal_pointer
fu-pefile-struct.c:g_steal_pointer
Line
Count
Source
235
17.7k
{
236
17.7k
  gpointer *ptr = (gpointer *) pp;
237
17.7k
  gpointer ref;
238
239
17.7k
  ref = *ptr;
240
17.7k
  *ptr = NULL;
241
242
17.7k
  return ref;
243
17.7k
}
Unexecuted instantiation: fu-pci-struct.c:g_steal_pointer
Unexecuted instantiation: fu-processor-struct.c:g_steal_pointer
Unexecuted instantiation: fu-protobuf-struct.c:g_steal_pointer
Unexecuted instantiation: fu-quirks-struct.c:g_steal_pointer
fu-sbatlevel-section-struct.c:g_steal_pointer
Line
Count
Source
235
96
{
236
96
  gpointer *ptr = (gpointer *) pp;
237
96
  gpointer ref;
238
239
96
  ref = *ptr;
240
96
  *ptr = NULL;
241
242
96
  return ref;
243
96
}
Unexecuted instantiation: fu-security-attrs-struct.c:g_steal_pointer
Unexecuted instantiation: fu-smbios-struct.c:g_steal_pointer
Unexecuted instantiation: fu-srec-struct.c:g_steal_pointer
fu-tpm-struct.c:g_steal_pointer
Line
Count
Source
235
1.03M
{
236
1.03M
  gpointer *ptr = (gpointer *) pp;
237
1.03M
  gpointer ref;
238
239
1.03M
  ref = *ptr;
240
1.03M
  *ptr = NULL;
241
242
1.03M
  return ref;
243
1.03M
}
Unexecuted instantiation: fu-usb-device-ds20-struct.c:g_steal_pointer
fu-usb-struct.c:g_steal_pointer
Line
Count
Source
235
865k
{
236
865k
  gpointer *ptr = (gpointer *) pp;
237
865k
  gpointer ref;
238
239
865k
  ref = *ptr;
240
865k
  *ptr = NULL;
241
242
865k
  return ref;
243
865k
}
fu-uswid-struct.c:g_steal_pointer
Line
Count
Source
235
74.4k
{
236
74.4k
  gpointer *ptr = (gpointer *) pp;
237
74.4k
  gpointer ref;
238
239
74.4k
  ref = *ptr;
240
74.4k
  *ptr = NULL;
241
242
74.4k
  return ref;
243
74.4k
}
Unexecuted instantiation: fu-v4l-struct.c:g_steal_pointer
fu-zip-struct.c:g_steal_pointer
Line
Count
Source
235
61.2k
{
236
61.2k
  gpointer *ptr = (gpointer *) pp;
237
61.2k
  gpointer ref;
238
239
61.2k
  ref = *ptr;
240
61.2k
  *ptr = NULL;
241
242
61.2k
  return ref;
243
61.2k
}
fu-acpi-table.c:g_steal_pointer
Line
Count
Source
235
147
{
236
147
  gpointer *ptr = (gpointer *) pp;
237
147
  gpointer ref;
238
239
147
  ref = *ptr;
240
147
  *ptr = NULL;
241
242
147
  return ref;
243
147
}
Unexecuted instantiation: fu-backend.c:g_steal_pointer
Unexecuted instantiation: fu-bios-setting.c:g_steal_pointer
Unexecuted instantiation: fu-byte-array.c:g_steal_pointer
Unexecuted instantiation: fu-bytes.c:g_steal_pointer
fu-cab-firmware.c:g_steal_pointer
Line
Count
Source
235
535
{
236
535
  gpointer *ptr = (gpointer *) pp;
237
535
  gpointer ref;
238
239
535
  ref = *ptr;
240
535
  *ptr = NULL;
241
242
535
  return ref;
243
535
}
Unexecuted instantiation: fu-cab-image.c:g_steal_pointer
fu-cbor-item.c:g_steal_pointer
Line
Count
Source
235
685k
{
236
685k
  gpointer *ptr = (gpointer *) pp;
237
685k
  gpointer ref;
238
239
685k
  ref = *ptr;
240
685k
  *ptr = NULL;
241
242
685k
  return ref;
243
685k
}
fu-cbor-common.c:g_steal_pointer
Line
Count
Source
235
482k
{
236
482k
  gpointer *ptr = (gpointer *) pp;
237
482k
  gpointer ref;
238
239
482k
  ref = *ptr;
240
482k
  *ptr = NULL;
241
242
482k
  return ref;
243
482k
}
fu-cfu-offer.c:g_steal_pointer
Line
Count
Source
235
38
{
236
38
  gpointer *ptr = (gpointer *) pp;
237
38
  gpointer ref;
238
239
38
  ref = *ptr;
240
38
  *ptr = NULL;
241
242
38
  return ref;
243
38
}
fu-cfu-payload.c:g_steal_pointer
Line
Count
Source
235
364
{
236
364
  gpointer *ptr = (gpointer *) pp;
237
364
  gpointer ref;
238
239
364
  ref = *ptr;
240
364
  *ptr = NULL;
241
242
364
  return ref;
243
364
}
Unexecuted instantiation: fu-chunk.c:g_steal_pointer
fu-chunk-array.c:g_steal_pointer
Line
Count
Source
235
1.32M
{
236
1.32M
  gpointer *ptr = (gpointer *) pp;
237
1.32M
  gpointer ref;
238
239
1.32M
  ref = *ptr;
240
1.32M
  *ptr = NULL;
241
242
1.32M
  return ref;
243
1.32M
}
Unexecuted instantiation: fu-common.c:g_steal_pointer
Unexecuted instantiation: fu-composite-input-stream.c:g_steal_pointer
fu-compressor-stream.c:g_steal_pointer
Line
Count
Source
235
11.1k
{
236
11.1k
  gpointer *ptr = (gpointer *) pp;
237
11.1k
  gpointer ref;
238
239
11.1k
  ref = *ptr;
240
11.1k
  *ptr = NULL;
241
242
11.1k
  return ref;
243
11.1k
}
Unexecuted instantiation: fu-config.c:g_steal_pointer
Unexecuted instantiation: fu-context.c:g_steal_pointer
Unexecuted instantiation: fu-coswid-common.c:g_steal_pointer
fu-coswid-firmware.c:g_steal_pointer
Line
Count
Source
235
68.1k
{
236
68.1k
  gpointer *ptr = (gpointer *) pp;
237
68.1k
  gpointer ref;
238
239
68.1k
  ref = *ptr;
240
68.1k
  *ptr = NULL;
241
242
68.1k
  return ref;
243
68.1k
}
Unexecuted instantiation: fu-coswid-collection.c:g_steal_pointer
Unexecuted instantiation: fu-crc.c:g_steal_pointer
fu-csv-entry.c:g_steal_pointer
Line
Count
Source
235
159k
{
236
159k
  gpointer *ptr = (gpointer *) pp;
237
159k
  gpointer ref;
238
239
159k
  ref = *ptr;
240
159k
  *ptr = NULL;
241
242
159k
  return ref;
243
159k
}
fu-csv-firmware.c:g_steal_pointer
Line
Count
Source
235
3.07k
{
236
3.07k
  gpointer *ptr = (gpointer *) pp;
237
3.07k
  gpointer ref;
238
239
3.07k
  ref = *ptr;
240
3.07k
  *ptr = NULL;
241
242
3.07k
  return ref;
243
3.07k
}
fu-device.c:g_steal_pointer
Line
Count
Source
235
2.44k
{
236
2.44k
  gpointer *ptr = (gpointer *) pp;
237
2.44k
  gpointer ref;
238
239
2.44k
  ref = *ptr;
240
2.44k
  *ptr = NULL;
241
242
2.44k
  return ref;
243
2.44k
}
Unexecuted instantiation: fu-device-event.c:g_steal_pointer
Unexecuted instantiation: fu-device-locker.c:g_steal_pointer
fu-dfu-firmware.c:g_steal_pointer
Line
Count
Source
235
130
{
236
130
  gpointer *ptr = (gpointer *) pp;
237
130
  gpointer ref;
238
239
130
  ref = *ptr;
240
130
  *ptr = NULL;
241
242
130
  return ref;
243
130
}
fu-dfuse-firmware.c:g_steal_pointer
Line
Count
Source
235
1.74k
{
236
1.74k
  gpointer *ptr = (gpointer *) pp;
237
1.74k
  gpointer ref;
238
239
1.74k
  ref = *ptr;
240
1.74k
  *ptr = NULL;
241
242
1.74k
  return ref;
243
1.74k
}
Unexecuted instantiation: fu-dummy-efivars.c:g_steal_pointer
Unexecuted instantiation: fu-dump.c:g_steal_pointer
fu-edid.c:g_steal_pointer
Line
Count
Source
235
439
{
236
439
  gpointer *ptr = (gpointer *) pp;
237
439
  gpointer ref;
238
239
439
  ref = *ptr;
240
439
  *ptr = NULL;
241
242
439
  return ref;
243
439
}
Unexecuted instantiation: fu-efi-common.c:g_steal_pointer
fu-efi-device-path.c:g_steal_pointer
Line
Count
Source
235
38.4k
{
236
38.4k
  gpointer *ptr = (gpointer *) pp;
237
38.4k
  gpointer ref;
238
239
38.4k
  ref = *ptr;
240
38.4k
  *ptr = NULL;
241
242
38.4k
  return ref;
243
38.4k
}
fu-efi-device-path-list.c:g_steal_pointer
Line
Count
Source
235
1.00k
{
236
1.00k
  gpointer *ptr = (gpointer *) pp;
237
1.00k
  gpointer ref;
238
239
1.00k
  ref = *ptr;
240
1.00k
  *ptr = NULL;
241
242
1.00k
  return ref;
243
1.00k
}
Unexecuted instantiation: fu-efi-file-path-device-path.c:g_steal_pointer
fu-efi-file.c:g_steal_pointer
Line
Count
Source
235
7.49k
{
236
7.49k
  gpointer *ptr = (gpointer *) pp;
237
7.49k
  gpointer ref;
238
239
7.49k
  ref = *ptr;
240
7.49k
  *ptr = NULL;
241
242
7.49k
  return ref;
243
7.49k
}
fu-efi-filesystem.c:g_steal_pointer
Line
Count
Source
235
1.06k
{
236
1.06k
  gpointer *ptr = (gpointer *) pp;
237
1.06k
  gpointer ref;
238
239
1.06k
  ref = *ptr;
240
1.06k
  *ptr = NULL;
241
242
1.06k
  return ref;
243
1.06k
}
fu-efi-section.c:g_steal_pointer
Line
Count
Source
235
12.0k
{
236
12.0k
  gpointer *ptr = (gpointer *) pp;
237
12.0k
  gpointer ref;
238
239
12.0k
  ref = *ptr;
240
12.0k
  *ptr = NULL;
241
242
12.0k
  return ref;
243
12.0k
}
fu-efi-volume.c:g_steal_pointer
Line
Count
Source
235
4.69k
{
236
4.69k
  gpointer *ptr = (gpointer *) pp;
237
4.69k
  gpointer ref;
238
239
4.69k
  ref = *ptr;
240
4.69k
  *ptr = NULL;
241
242
4.69k
  return ref;
243
4.69k
}
fu-efi-lz77-decompressor.c:g_steal_pointer
Line
Count
Source
235
4.68k
{
236
4.68k
  gpointer *ptr = (gpointer *) pp;
237
4.68k
  gpointer ref;
238
239
4.68k
  ref = *ptr;
240
4.68k
  *ptr = NULL;
241
242
4.68k
  return ref;
243
4.68k
}
fu-efi-hard-drive-device-path.c:g_steal_pointer
Line
Count
Source
235
386
{
236
386
  gpointer *ptr = (gpointer *) pp;
237
386
  gpointer ref;
238
239
386
  ref = *ptr;
240
386
  *ptr = NULL;
241
242
386
  return ref;
243
386
}
fu-efi-load-option.c:g_steal_pointer
Line
Count
Source
235
1.67k
{
236
1.67k
  gpointer *ptr = (gpointer *) pp;
237
1.67k
  gpointer ref;
238
239
1.67k
  ref = *ptr;
240
1.67k
  *ptr = NULL;
241
242
1.67k
  return ref;
243
1.67k
}
Unexecuted instantiation: fu-efi-signature.c:g_steal_pointer
Unexecuted instantiation: fu-efi-signature-list.c:g_steal_pointer
fu-efi-vss2-variable-store.c:g_steal_pointer
Line
Count
Source
235
478
{
236
478
  gpointer *ptr = (gpointer *) pp;
237
478
  gpointer ref;
238
239
478
  ref = *ptr;
240
478
  *ptr = NULL;
241
242
478
  return ref;
243
478
}
fu-efi-vss-auth-variable.c:g_steal_pointer
Line
Count
Source
235
2.03k
{
236
2.03k
  gpointer *ptr = (gpointer *) pp;
237
2.03k
  gpointer ref;
238
239
2.03k
  ref = *ptr;
240
2.03k
  *ptr = NULL;
241
242
2.03k
  return ref;
243
2.03k
}
fu-efi-ftw-store.c:g_steal_pointer
Line
Count
Source
235
300
{
236
300
  gpointer *ptr = (gpointer *) pp;
237
300
  gpointer ref;
238
239
300
  ref = *ptr;
240
300
  *ptr = NULL;
241
242
300
  return ref;
243
300
}
Unexecuted instantiation: fu-efivars.c:g_steal_pointer
Unexecuted instantiation: fu-efi-x509-signature.c:g_steal_pointer
fu-elf-firmware.c:g_steal_pointer
Line
Count
Source
235
1.10M
{
236
1.10M
  gpointer *ptr = (gpointer *) pp;
237
1.10M
  gpointer ref;
238
239
1.10M
  ref = *ptr;
240
1.10M
  *ptr = NULL;
241
242
1.10M
  return ref;
243
1.10M
}
fu-fdt-firmware.c:g_steal_pointer
Line
Count
Source
235
3.90k
{
236
3.90k
  gpointer *ptr = (gpointer *) pp;
237
3.90k
  gpointer ref;
238
239
3.90k
  ref = *ptr;
240
3.90k
  *ptr = NULL;
241
242
3.90k
  return ref;
243
3.90k
}
Unexecuted instantiation: fu-fdt-image.c:g_steal_pointer
fu-firmware.c:g_steal_pointer
Line
Count
Source
235
668k
{
236
668k
  gpointer *ptr = (gpointer *) pp;
237
668k
  gpointer ref;
238
239
668k
  ref = *ptr;
240
668k
  *ptr = NULL;
241
242
668k
  return ref;
243
668k
}
Unexecuted instantiation: fu-firmware-common.c:g_steal_pointer
Unexecuted instantiation: fu-fit-firmware.c:g_steal_pointer
fu-fmap-firmware.c:g_steal_pointer
Line
Count
Source
235
757
{
236
757
  gpointer *ptr = (gpointer *) pp;
237
757
  gpointer ref;
238
239
757
  ref = *ptr;
240
757
  *ptr = NULL;
241
242
757
  return ref;
243
757
}
Unexecuted instantiation: fu-fuzzer.c:g_steal_pointer
Unexecuted instantiation: fu-ginput-stream-adapter.c:g_steal_pointer
fu-hid-descriptor.c:g_steal_pointer
Line
Count
Source
235
812
{
236
812
  gpointer *ptr = (gpointer *) pp;
237
812
  gpointer ref;
238
239
812
  ref = *ptr;
240
812
  *ptr = NULL;
241
242
812
  return ref;
243
812
}
fu-hid-report-item.c:g_steal_pointer
Line
Count
Source
235
5.80k
{
236
5.80k
  gpointer *ptr = (gpointer *) pp;
237
5.80k
  gpointer ref;
238
239
5.80k
  ref = *ptr;
240
5.80k
  *ptr = NULL;
241
242
5.80k
  return ref;
243
5.80k
}
Unexecuted instantiation: fu-hid-report.c:g_steal_pointer
Unexecuted instantiation: fu-hwids.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-config.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-dmi.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-fdt.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-kenv.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-darwin.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-smbios.c:g_steal_pointer
Unexecuted instantiation: fu-ifd-bios.c:g_steal_pointer
fu-ifd-firmware.c:g_steal_pointer
Line
Count
Source
235
1.15k
{
236
1.15k
  gpointer *ptr = (gpointer *) pp;
237
1.15k
  gpointer ref;
238
239
1.15k
  ref = *ptr;
240
1.15k
  *ptr = NULL;
241
242
1.15k
  return ref;
243
1.15k
}
fu-ifd-image.c:g_steal_pointer
Line
Count
Source
235
1.92k
{
236
1.92k
  gpointer *ptr = (gpointer *) pp;
237
1.92k
  gpointer ref;
238
239
1.92k
  ref = *ptr;
240
1.92k
  *ptr = NULL;
241
242
1.92k
  return ref;
243
1.92k
}
fu-ifwi-cpd-firmware.c:g_steal_pointer
Line
Count
Source
235
146
{
236
146
  gpointer *ptr = (gpointer *) pp;
237
146
  gpointer ref;
238
239
146
  ref = *ptr;
240
146
  *ptr = NULL;
241
242
146
  return ref;
243
146
}
Unexecuted instantiation: fu-ifwi-cpd-image.c:g_steal_pointer
fu-ifwi-fpt-firmware.c:g_steal_pointer
Line
Count
Source
235
67
{
236
67
  gpointer *ptr = (gpointer *) pp;
237
67
  gpointer ref;
238
239
67
  ref = *ptr;
240
67
  *ptr = NULL;
241
242
67
  return ref;
243
67
}
fu-ihex-firmware.c:g_steal_pointer
Line
Count
Source
235
417k
{
236
417k
  gpointer *ptr = (gpointer *) pp;
237
417k
  gpointer ref;
238
239
417k
  ref = *ptr;
240
417k
  *ptr = NULL;
241
242
417k
  return ref;
243
417k
}
fu-input-stream.c:g_steal_pointer
Line
Count
Source
235
15.2M
{
236
15.2M
  gpointer *ptr = (gpointer *) pp;
237
15.2M
  gpointer ref;
238
239
15.2M
  ref = *ptr;
240
15.2M
  *ptr = NULL;
241
242
15.2M
  return ref;
243
15.2M
}
Unexecuted instantiation: fu-intel-me-device.c:g_steal_pointer
fu-intel-thunderbolt-firmware.c:g_steal_pointer
Line
Count
Source
235
84
{
236
84
  gpointer *ptr = (gpointer *) pp;
237
84
  gpointer ref;
238
239
84
  ref = *ptr;
240
84
  *ptr = NULL;
241
242
84
  return ref;
243
84
}
fu-intel-thunderbolt-nvm.c:g_steal_pointer
Line
Count
Source
235
84
{
236
84
  gpointer *ptr = (gpointer *) pp;
237
84
  gpointer ref;
238
239
84
  ref = *ptr;
240
84
  *ptr = NULL;
241
242
84
  return ref;
243
84
}
Unexecuted instantiation: fu-io-channel.c:g_steal_pointer
Unexecuted instantiation: fu-ioctl.c:g_steal_pointer
fu-json-firmware.c:g_steal_pointer
Line
Count
Source
235
153
{
236
153
  gpointer *ptr = (gpointer *) pp;
237
153
  gpointer ref;
238
239
153
  ref = *ptr;
240
153
  *ptr = NULL;
241
242
153
  return ref;
243
153
}
Unexecuted instantiation: fu-json-parser.c:g_steal_pointer
Unexecuted instantiation: fu-kenv.c:g_steal_pointer
Unexecuted instantiation: fu-kernel.c:g_steal_pointer
Unexecuted instantiation: fu-kernel-search-path.c:g_steal_pointer
fu-linear-firmware.c:g_steal_pointer
Line
Count
Source
235
111
{
236
111
  gpointer *ptr = (gpointer *) pp;
237
111
  gpointer ref;
238
239
111
  ref = *ptr;
240
111
  *ptr = NULL;
241
242
111
  return ref;
243
111
}
Unexecuted instantiation: fu-lzma-common.c:g_steal_pointer
fu-mem.c:g_steal_pointer
Line
Count
Source
235
436k
{
236
436k
  gpointer *ptr = (gpointer *) pp;
237
436k
  gpointer ref;
238
239
436k
  ref = *ptr;
240
436k
  *ptr = NULL;
241
242
436k
  return ref;
243
436k
}
fu-oprom-firmware.c:g_steal_pointer
Line
Count
Source
235
787
{
236
787
  gpointer *ptr = (gpointer *) pp;
237
787
  gpointer ref;
238
239
787
  ref = *ptr;
240
787
  *ptr = NULL;
241
242
787
  return ref;
243
787
}
fu-partial-input-stream.c:g_steal_pointer
Line
Count
Source
235
1.37M
{
236
1.37M
  gpointer *ptr = (gpointer *) pp;
237
1.37M
  gpointer ref;
238
239
1.37M
  ref = *ptr;
240
1.37M
  *ptr = NULL;
241
242
1.37M
  return ref;
243
1.37M
}
Unexecuted instantiation: fu-path.c:g_steal_pointer
Unexecuted instantiation: fu-path-store.c:g_steal_pointer
fu-pefile-firmware.c:g_steal_pointer
Line
Count
Source
235
9.65k
{
236
9.65k
  gpointer *ptr = (gpointer *) pp;
237
9.65k
  gpointer ref;
238
239
9.65k
  ref = *ptr;
240
9.65k
  *ptr = NULL;
241
242
9.65k
  return ref;
243
9.65k
}
Unexecuted instantiation: fu-pkcs7.c:g_steal_pointer
fu-protobuf.c:g_steal_pointer
Line
Count
Source
235
267
{
236
267
  gpointer *ptr = (gpointer *) pp;
237
267
  gpointer ref;
238
239
267
  ref = *ptr;
240
267
  *ptr = NULL;
241
242
267
  return ref;
243
267
}
Unexecuted instantiation: fu-output-stream.c:g_steal_pointer
Unexecuted instantiation: fu-progress.c:g_steal_pointer
Unexecuted instantiation: fu-quirks.c:g_steal_pointer
fu-sbatlevel-section.c:g_steal_pointer
Line
Count
Source
235
11
{
236
11
  gpointer *ptr = (gpointer *) pp;
237
11
  gpointer ref;
238
239
11
  ref = *ptr;
240
11
  *ptr = NULL;
241
242
11
  return ref;
243
11
}
Unexecuted instantiation: fu-secure-bytes.c:g_steal_pointer
Unexecuted instantiation: fu-security-attr.c:g_steal_pointer
Unexecuted instantiation: fu-security-attrs.c:g_steal_pointer
Unexecuted instantiation: fu-smbios.c:g_steal_pointer
fu-srec-firmware.c:g_steal_pointer
Line
Count
Source
235
1.07M
{
236
1.07M
  gpointer *ptr = (gpointer *) pp;
237
1.07M
  gpointer ref;
238
239
1.07M
  ref = *ptr;
240
1.07M
  *ptr = NULL;
241
242
1.07M
  return ref;
243
1.07M
}
fu-string.c:g_steal_pointer
Line
Count
Source
235
163k
{
236
163k
  gpointer *ptr = (gpointer *) pp;
237
163k
  gpointer ref;
238
239
163k
  ref = *ptr;
240
163k
  *ptr = NULL;
241
242
163k
  return ref;
243
163k
}
Unexecuted instantiation: fu-sum.c:g_steal_pointer
Unexecuted instantiation: fu-temporary-directory.c:g_steal_pointer
Unexecuted instantiation: fu-tpm-eventlog-item.c:g_steal_pointer
Unexecuted instantiation: fu-tpm-eventlog.c:g_steal_pointer
fu-tpm-eventlog-v1.c:g_steal_pointer
Line
Count
Source
235
81
{
236
81
  gpointer *ptr = (gpointer *) pp;
237
81
  gpointer ref;
238
239
81
  ref = *ptr;
240
81
  *ptr = NULL;
241
242
81
  return ref;
243
81
}
fu-tpm-eventlog-v2.c:g_steal_pointer
Line
Count
Source
235
3.91k
{
236
3.91k
  gpointer *ptr = (gpointer *) pp;
237
3.91k
  gpointer ref;
238
239
3.91k
  ref = *ptr;
240
3.91k
  *ptr = NULL;
241
242
3.91k
  return ref;
243
3.91k
}
Unexecuted instantiation: fu-udev-device.c:g_steal_pointer
Unexecuted instantiation: fu-usb-bos-descriptor.c:g_steal_pointer
Unexecuted instantiation: fu-usb-config-descriptor.c:g_steal_pointer
Unexecuted instantiation: fu-usb-descriptor.c:g_steal_pointer
fu-usb-device.c:g_steal_pointer
Line
Count
Source
235
202k
{
236
202k
  gpointer *ptr = (gpointer *) pp;
237
202k
  gpointer ref;
238
239
202k
  ref = *ptr;
240
202k
  *ptr = NULL;
241
242
202k
  return ref;
243
202k
}
Unexecuted instantiation: fu-usb-device-ds20.c:g_steal_pointer
Unexecuted instantiation: fu-usb-device-fw-ds20.c:g_steal_pointer
Unexecuted instantiation: fu-usb-device-ms-ds20.c:g_steal_pointer
Unexecuted instantiation: fu-usb-endpoint.c:g_steal_pointer
Unexecuted instantiation: fu-usb-hid-descriptor.c:g_steal_pointer
Unexecuted instantiation: fu-usb-interface.c:g_steal_pointer
fu-uswid-firmware.c:g_steal_pointer
Line
Count
Source
235
852
{
236
852
  gpointer *ptr = (gpointer *) pp;
237
852
  gpointer ref;
238
239
852
  ref = *ptr;
240
852
  *ptr = NULL;
241
242
852
  return ref;
243
852
}
Unexecuted instantiation: fu-version-common.c:g_steal_pointer
Unexecuted instantiation: fu-volume.c:g_steal_pointer
Unexecuted instantiation: fu-volume-locker.c:g_steal_pointer
Unexecuted instantiation: fu-x509-certificate.c:g_steal_pointer
Unexecuted instantiation: fu-xor.c:g_steal_pointer
fu-zip-firmware.c:g_steal_pointer
Line
Count
Source
235
12.8k
{
236
12.8k
  gpointer *ptr = (gpointer *) pp;
237
12.8k
  gpointer ref;
238
239
12.8k
  ref = *ptr;
240
12.8k
  *ptr = NULL;
241
242
12.8k
  return ref;
243
12.8k
}
Unexecuted instantiation: fu-zip-file.c:g_steal_pointer
Unexecuted instantiation: fu-common-linux.c:g_steal_pointer
Unexecuted instantiation: fu-darwin-efivars.c:g_steal_pointer
Unexecuted instantiation: fu-fuzzer-firmware.c:g_steal_pointer
Unexecuted instantiation: xb-builder.c:g_steal_pointer
Unexecuted instantiation: xb-builder-fixup.c:g_steal_pointer
Unexecuted instantiation: xb-builder-node.c:g_steal_pointer
Unexecuted instantiation: xb-builder-source.c:g_steal_pointer
Unexecuted instantiation: xb-builder-source-ctx.c:g_steal_pointer
Unexecuted instantiation: xb-common.c:g_steal_pointer
Unexecuted instantiation: xb-node.c:g_steal_pointer
Unexecuted instantiation: xb-node-query.c:g_steal_pointer
Unexecuted instantiation: xb-query.c:g_steal_pointer
Unexecuted instantiation: xb-query-context.c:g_steal_pointer
Unexecuted instantiation: xb-silo.c:g_steal_pointer
Unexecuted instantiation: xb-silo-export.c:g_steal_pointer
Unexecuted instantiation: xb-silo-query.c:g_steal_pointer
Unexecuted instantiation: xb-stack.c:g_steal_pointer
Unexecuted instantiation: xb-string.c:g_steal_pointer
Unexecuted instantiation: xb-value-bindings.c:g_steal_pointer
Unexecuted instantiation: xb-version.c:g_steal_pointer
Unexecuted instantiation: xb-zstd-decompressor.c:g_steal_pointer
Unexecuted instantiation: xb-lzma-decompressor.c:g_steal_pointer
Unexecuted instantiation: xb-machine.c:g_steal_pointer
Unexecuted instantiation: xb-opcode.c:g_steal_pointer
fu-ccgx-struct.c:g_steal_pointer
Line
Count
Source
235
440
{
236
440
  gpointer *ptr = (gpointer *) pp;
237
440
  gpointer ref;
238
239
440
  ref = *ptr;
240
440
  *ptr = NULL;
241
242
440
  return ref;
243
440
}
Unexecuted instantiation: fu-ccgx-pure-hid-struct.c:g_steal_pointer
Unexecuted instantiation: fu-ccgx-common.c:g_steal_pointer
fu-ccgx-firmware.c:g_steal_pointer
Line
Count
Source
235
715k
{
236
715k
  gpointer *ptr = (gpointer *) pp;
237
715k
  gpointer ref;
238
239
715k
  ref = *ptr;
240
715k
  *ptr = NULL;
241
242
715k
  return ref;
243
715k
}
Unexecuted instantiation: fu-genesys-struct.c:g_steal_pointer
fu-genesys-usbhub-struct.c:g_steal_pointer
Line
Count
Source
235
1.24k
{
236
1.24k
  gpointer *ptr = (gpointer *) pp;
237
1.24k
  gpointer ref;
238
239
1.24k
  ref = *ptr;
240
1.24k
  *ptr = NULL;
241
242
1.24k
  return ref;
243
1.24k
}
fu-genesys-scaler-firmware.c:g_steal_pointer
Line
Count
Source
235
136
{
236
136
  gpointer *ptr = (gpointer *) pp;
237
136
  gpointer ref;
238
239
136
  ref = *ptr;
240
136
  *ptr = NULL;
241
242
136
  return ref;
243
136
}
fu-genesys-usbhub-firmware.c:g_steal_pointer
Line
Count
Source
235
67
{
236
67
  gpointer *ptr = (gpointer *) pp;
237
67
  gpointer ref;
238
239
67
  ref = *ptr;
240
67
  *ptr = NULL;
241
242
67
  return ref;
243
67
}
Unexecuted instantiation: fu-genesys-usbhub-dev-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-genesys-usbhub-pd-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-genesys-usbhub-codesign-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-cros-ec-struct.c:g_steal_pointer
Unexecuted instantiation: fu-cros-ec-common.c:g_steal_pointer
Unexecuted instantiation: fu-cros-ec-firmware.c:g_steal_pointer
fu-acpi-phat-struct.c:g_steal_pointer
Line
Count
Source
235
29.2k
{
236
29.2k
  gpointer *ptr = (gpointer *) pp;
237
29.2k
  gpointer ref;
238
239
29.2k
  ref = *ptr;
240
29.2k
  *ptr = NULL;
241
242
29.2k
  return ref;
243
29.2k
}
fu-acpi-phat.c:g_steal_pointer
Line
Count
Source
235
453
{
236
453
  gpointer *ptr = (gpointer *) pp;
237
453
  gpointer ref;
238
239
453
  ref = *ptr;
240
453
  *ptr = NULL;
241
242
453
  return ref;
243
453
}
fu-acpi-phat-health-record.c:g_steal_pointer
Line
Count
Source
235
847
{
236
847
  gpointer *ptr = (gpointer *) pp;
237
847
  gpointer ref;
238
239
847
  ref = *ptr;
240
847
  *ptr = NULL;
241
242
847
  return ref;
243
847
}
fu-acpi-phat-version-element.c:g_steal_pointer
Line
Count
Source
235
4.21k
{
236
4.21k
  gpointer *ptr = (gpointer *) pp;
237
4.21k
  gpointer ref;
238
239
4.21k
  ref = *ptr;
240
4.21k
  *ptr = NULL;
241
242
4.21k
  return ref;
243
4.21k
}
fu-acpi-phat-version-record.c:g_steal_pointer
Line
Count
Source
235
6.12k
{
236
6.12k
  gpointer *ptr = (gpointer *) pp;
237
6.12k
  gpointer ref;
238
239
6.12k
  ref = *ptr;
240
6.12k
  *ptr = NULL;
241
242
6.12k
  return ref;
243
6.12k
}
Unexecuted instantiation: fu-pixart-rf-struct.c:g_steal_pointer
Unexecuted instantiation: fu-pixart-rf-common.c:g_steal_pointer
fu-pixart-rf-firmware.c:g_steal_pointer
Line
Count
Source
235
103
{
236
103
  gpointer *ptr = (gpointer *) pp;
237
103
  gpointer ref;
238
239
103
  ref = *ptr;
240
103
  *ptr = NULL;
241
242
103
  return ref;
243
103
}
fu-ebitdo-struct.c:g_steal_pointer
Line
Count
Source
235
218
{
236
218
  gpointer *ptr = (gpointer *) pp;
237
218
  gpointer ref;
238
239
218
  ref = *ptr;
240
218
  *ptr = NULL;
241
242
218
  return ref;
243
218
}
fu-ebitdo-firmware.c:g_steal_pointer
Line
Count
Source
235
95
{
236
95
  gpointer *ptr = (gpointer *) pp;
237
95
  gpointer ref;
238
239
95
  ref = *ptr;
240
95
  *ptr = NULL;
241
242
95
  return ref;
243
95
}
fu-realtek-alc408x-struct.c:g_steal_pointer
Line
Count
Source
235
2
{
236
2
  gpointer *ptr = (gpointer *) pp;
237
2
  gpointer ref;
238
239
2
  ref = *ptr;
240
2
  *ptr = NULL;
241
242
2
  return ref;
243
2
}
Unexecuted instantiation: fu-realtek-alc408x-common.c:g_steal_pointer
fu-realtek-alc408x-firmware.c:g_steal_pointer
Line
Count
Source
235
1
{
236
1
  gpointer *ptr = (gpointer *) pp;
237
1
  gpointer ref;
238
239
1
  ref = *ptr;
240
1
  *ptr = NULL;
241
242
1
  return ref;
243
1
}
fu-uf2-struct.c:g_steal_pointer
Line
Count
Source
235
12.0k
{
236
12.0k
  gpointer *ptr = (gpointer *) pp;
237
12.0k
  gpointer ref;
238
239
12.0k
  ref = *ptr;
240
12.0k
  *ptr = NULL;
241
242
12.0k
  return ref;
243
12.0k
}
fu-uf2-firmware.c:g_steal_pointer
Line
Count
Source
235
1.42k
{
236
1.42k
  gpointer *ptr = (gpointer *) pp;
237
1.42k
  gpointer ref;
238
239
1.42k
  ref = *ptr;
240
1.42k
  *ptr = NULL;
241
242
1.42k
  return ref;
243
1.42k
}
fu-amd-afc-struct.c:g_steal_pointer
Line
Count
Source
235
233k
{
236
233k
  gpointer *ptr = (gpointer *) pp;
237
233k
  gpointer ref;
238
239
233k
  ref = *ptr;
240
233k
  *ptr = NULL;
241
242
233k
  return ref;
243
233k
}
Unexecuted instantiation: fu-amd-afc-acpi-table.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-bios-setting.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-config-entry.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-config.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-form.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-option.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-pending.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-setting.c:g_steal_pointer
fu-amd-afc-state.c:g_steal_pointer
Line
Count
Source
235
82.3k
{
236
82.3k
  gpointer *ptr = (gpointer *) pp;
237
82.3k
  gpointer ref;
238
239
82.3k
  ref = *ptr;
240
82.3k
  *ptr = NULL;
241
242
82.3k
  return ref;
243
82.3k
}
Unexecuted instantiation: fu-amd-afc-varstore.c:g_steal_pointer
Unexecuted instantiation: fu-hughski-colorhug-struct.c:g_steal_pointer
Unexecuted instantiation: fu-hughski-colorhug-device.c:g_steal_pointer
Unexecuted instantiation: fu-wacom-usb-struct.c:g_steal_pointer
fu-wacom-usb-firmware.c:g_steal_pointer
Line
Count
Source
235
3.04k
{
236
3.04k
  gpointer *ptr = (gpointer *) pp;
237
3.04k
  gpointer ref;
238
239
3.04k
  ref = *ptr;
240
3.04k
  *ptr = NULL;
241
242
3.04k
  return ref;
243
3.04k
}
fu-elantp-struct.c:g_steal_pointer
Line
Count
Source
235
304
{
236
304
  gpointer *ptr = (gpointer *) pp;
237
304
  gpointer ref;
238
239
304
  ref = *ptr;
240
304
  *ptr = NULL;
241
242
304
  return ref;
243
304
}
fu-elantp-firmware.c:g_steal_pointer
Line
Count
Source
235
202
{
236
202
  gpointer *ptr = (gpointer *) pp;
237
202
  gpointer ref;
238
239
202
  ref = *ptr;
240
202
  *ptr = NULL;
241
242
202
  return ref;
243
202
}
fu-redfish-struct.c:g_steal_pointer
Line
Count
Source
235
2.97k
{
236
2.97k
  gpointer *ptr = (gpointer *) pp;
237
2.97k
  gpointer ref;
238
239
2.97k
  ref = *ptr;
240
2.97k
  *ptr = NULL;
241
242
2.97k
  return ref;
243
2.97k
}
Unexecuted instantiation: fu-redfish-common.c:g_steal_pointer
fu-redfish-smbios.c:g_steal_pointer
Line
Count
Source
235
54
{
236
54
  gpointer *ptr = (gpointer *) pp;
237
54
  gpointer ref;
238
239
54
  ref = *ptr;
240
54
  *ptr = NULL;
241
242
54
  return ref;
243
54
}
Unexecuted instantiation: fu-elanfp-struct.c:g_steal_pointer
fu-elanfp-firmware.c:g_steal_pointer
Line
Count
Source
235
103
{
236
103
  gpointer *ptr = (gpointer *) pp;
237
103
  gpointer ref;
238
239
103
  ref = *ptr;
240
103
  *ptr = NULL;
241
242
103
  return ref;
243
103
}
fu-synaptics-prometheus-struct.c:g_steal_pointer
Line
Count
Source
235
4.41k
{
236
4.41k
  gpointer *ptr = (gpointer *) pp;
237
4.41k
  gpointer ref;
238
239
4.41k
  ref = *ptr;
240
4.41k
  *ptr = NULL;
241
242
4.41k
  return ref;
243
4.41k
}
fu-synaptics-prometheus-firmware.c:g_steal_pointer
Line
Count
Source
235
154
{
236
154
  gpointer *ptr = (gpointer *) pp;
237
154
  gpointer ref;
238
239
154
  ref = *ptr;
240
154
  *ptr = NULL;
241
242
154
  return ref;
243
154
}
fu-synaptics-mst-struct.c:g_steal_pointer
Line
Count
Source
235
332
{
236
332
  gpointer *ptr = (gpointer *) pp;
237
332
  gpointer ref;
238
239
332
  ref = *ptr;
240
332
  *ptr = NULL;
241
242
332
  return ref;
243
332
}
fu-synaptics-mst-firmware.c:g_steal_pointer
Line
Count
Source
235
78
{
236
78
  gpointer *ptr = (gpointer *) pp;
237
78
  gpointer ref;
238
239
78
  ref = *ptr;
240
78
  *ptr = NULL;
241
242
78
  return ref;
243
78
}
fu-ccgx-dmc-struct.c:g_steal_pointer
Line
Count
Source
235
16.1k
{
236
16.1k
  gpointer *ptr = (gpointer *) pp;
237
16.1k
  gpointer ref;
238
239
16.1k
  ref = *ptr;
240
16.1k
  *ptr = NULL;
241
242
16.1k
  return ref;
243
16.1k
}
fu-ccgx-dmc-firmware.c:g_steal_pointer
Line
Count
Source
235
381k
{
236
381k
  gpointer *ptr = (gpointer *) pp;
237
381k
  gpointer ref;
238
239
381k
  ref = *ptr;
240
381k
  *ptr = NULL;
241
242
381k
  return ref;
243
381k
}
fu-synaptics-rmi-struct.c:g_steal_pointer
Line
Count
Source
235
43.2k
{
236
43.2k
  gpointer *ptr = (gpointer *) pp;
237
43.2k
  gpointer ref;
238
239
43.2k
  ref = *ptr;
240
43.2k
  *ptr = NULL;
241
242
43.2k
  return ref;
243
43.2k
}
Unexecuted instantiation: fu-synaptics-rmi-common.c:g_steal_pointer
fu-synaptics-rmi-firmware.c:g_steal_pointer
Line
Count
Source
235
76
{
236
76
  gpointer *ptr = (gpointer *) pp;
237
76
  gpointer ref;
238
239
76
  ref = *ptr;
240
76
  *ptr = NULL;
241
242
76
  return ref;
243
76
}
fu-bcm57xx-struct.c:g_steal_pointer
Line
Count
Source
235
3.36k
{
236
3.36k
  gpointer *ptr = (gpointer *) pp;
237
3.36k
  gpointer ref;
238
239
3.36k
  ref = *ptr;
240
3.36k
  *ptr = NULL;
241
242
3.36k
  return ref;
243
3.36k
}
fu-bcm57xx-common.c:g_steal_pointer
Line
Count
Source
235
62
{
236
62
  gpointer *ptr = (gpointer *) pp;
237
62
  gpointer ref;
238
239
62
  ref = *ptr;
240
62
  *ptr = NULL;
241
242
62
  return ref;
243
62
}
fu-bcm57xx-dict-image.c:g_steal_pointer
Line
Count
Source
235
706
{
236
706
  gpointer *ptr = (gpointer *) pp;
237
706
  gpointer ref;
238
239
706
  ref = *ptr;
240
706
  *ptr = NULL;
241
242
706
  return ref;
243
706
}
fu-bcm57xx-firmware.c:g_steal_pointer
Line
Count
Source
235
3.06k
{
236
3.06k
  gpointer *ptr = (gpointer *) pp;
237
3.06k
  gpointer ref;
238
239
3.06k
  ref = *ptr;
240
3.06k
  *ptr = NULL;
241
242
3.06k
  return ref;
243
3.06k
}
fu-bcm57xx-stage1-image.c:g_steal_pointer
Line
Count
Source
235
170
{
236
170
  gpointer *ptr = (gpointer *) pp;
237
170
  gpointer ref;
238
239
170
  ref = *ptr;
240
170
  *ptr = NULL;
241
242
170
  return ref;
243
170
}
fu-bcm57xx-stage2-image.c:g_steal_pointer
Line
Count
Source
235
170
{
236
170
  gpointer *ptr = (gpointer *) pp;
237
170
  gpointer ref;
238
239
170
  ref = *ptr;
240
170
  *ptr = NULL;
241
242
170
  return ref;
243
170
}
244
245
/* type safety */
246
#if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58
247
35.5M
#define g_steal_pointer(pp) ((glib_typeof (*pp)) (g_steal_pointer) (pp))
248
#else  /* __GNUC__ */
249
/* This version does not depend on gcc extensions, but gcc does not warn
250
 * about incompatible-pointer-types: */
251
#define g_steal_pointer(pp) \
252
  (0 ? (*(pp)) : (g_steal_pointer) (pp))
253
#endif /* __GNUC__ */
254
255
/* Optimise: avoid the call to the (slower) _n function if we can
256
 * determine at compile-time that no overflow happens.
257
 */
258
#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__)
259
#  define _G_NEW(struct_type, n_structs, func) \
260
17.7M
  (struct_type *) (G_GNUC_EXTENSION ({     \
261
17.7M
    gsize __n = (gsize) (n_structs);      \
262
17.7M
    gsize __s = sizeof (struct_type);     \
263
17.7M
    gpointer __p;           \
264
17.7M
    if (__s == 1)           \
265
17.7M
      __p = g_##func (__n);       \
266
17.7M
    else if (__builtin_constant_p (__n) &&   \
267
17.7M
             (__s == 0 || __n <= G_MAXSIZE / __s)) \
268
17.7M
      __p = g_##func (__n * __s);       \
269
17.7M
    else              \
270
17.7M
      __p = g_##func##_n (__n, __s);     \
271
17.7M
    __p;              \
272
17.7M
  }))
273
#  define _G_RENEW(struct_type, mem, n_structs, func) \
274
  (struct_type *) (G_GNUC_EXTENSION ({      \
275
    gsize __n = (gsize) (n_structs);      \
276
    gsize __s = sizeof (struct_type);     \
277
    gpointer __p = (gpointer) (mem);      \
278
    if (__s == 1)           \
279
      __p = g_##func (__p, __n);        \
280
    else if (__builtin_constant_p (__n) &&    \
281
             (__s == 0 || __n <= G_MAXSIZE / __s))  \
282
      __p = g_##func (__p, __n * __s);      \
283
    else              \
284
      __p = g_##func##_n (__p, __n, __s);     \
285
    __p;              \
286
  }))
287
288
#else
289
290
/* Unoptimised version: always call the _n() function. */
291
292
#define _G_NEW(struct_type, n_structs, func) \
293
        ((struct_type *) g_##func##_n ((n_structs), sizeof (struct_type)))
294
#define _G_RENEW(struct_type, mem, n_structs, func) \
295
        ((struct_type *) g_##func##_n (mem, (n_structs), sizeof (struct_type)))
296
297
#endif
298
299
/**
300
 * g_new:
301
 * @struct_type: the type of the elements to allocate
302
 * @n_structs: the number of elements to allocate
303
 * 
304
 * Allocates @n_structs elements of type @struct_type.
305
 * The returned pointer is cast to a pointer to the given type.
306
 * If @n_structs is 0 it returns %NULL.
307
 * Care is taken to avoid overflow when calculating the size of the allocated block.
308
 * 
309
 * Since the returned pointer is already casted to the right type,
310
 * it is normally unnecessary to cast it explicitly, and doing
311
 * so might hide memory allocation errors.
312
 * 
313
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
314
 */
315
800
#define g_new(struct_type, n_structs)     _G_NEW (struct_type, n_structs, malloc)
316
/**
317
 * g_new0:
318
 * @struct_type: the type of the elements to allocate.
319
 * @n_structs: the number of elements to allocate.
320
 * 
321
 * Allocates @n_structs elements of type @struct_type, initialized to 0's.
322
 * The returned pointer is cast to a pointer to the given type.
323
 * If @n_structs is 0 it returns %NULL.
324
 * Care is taken to avoid overflow when calculating the size of the allocated block.
325
 * 
326
 * Since the returned pointer is already casted to the right type,
327
 * it is normally unnecessary to cast it explicitly, and doing
328
 * so might hide memory allocation errors.
329
 * 
330
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
331
 */
332
17.7M
#define g_new0(struct_type, n_structs)      _G_NEW (struct_type, n_structs, malloc0)
333
/**
334
 * g_renew:
335
 * @struct_type: the type of the elements to allocate
336
 * @mem: the currently allocated memory
337
 * @n_structs: the number of elements to allocate
338
 * 
339
 * Reallocates the memory pointed to by @mem, so that it now has space for
340
 * @n_structs elements of type @struct_type. It returns the new address of
341
 * the memory, which may have been moved.
342
 * Care is taken to avoid overflow when calculating the size of the allocated block.
343
 * 
344
 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
345
 */
346
#define g_renew(struct_type, mem, n_structs)    _G_RENEW (struct_type, mem, n_structs, realloc)
347
/**
348
 * g_try_new:
349
 * @struct_type: the type of the elements to allocate
350
 * @n_structs: the number of elements to allocate
351
 * 
352
 * Attempts to allocate @n_structs elements of type @struct_type, and returns
353
 * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
354
 * The returned pointer is cast to a pointer to the given type.
355
 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
356
 * 
357
 * Since: 2.8
358
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
359
 */
360
#define g_try_new(struct_type, n_structs)   _G_NEW (struct_type, n_structs, try_malloc)
361
/**
362
 * g_try_new0:
363
 * @struct_type: the type of the elements to allocate
364
 * @n_structs: the number of elements to allocate
365
 * 
366
 * Attempts to allocate @n_structs elements of type @struct_type, initialized
367
 * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
368
 * the program on failure.
369
 * The returned pointer is cast to a pointer to the given type.
370
 * The function returns %NULL when @n_structs is 0 or if an overflow occurs.
371
 * 
372
 * Since: 2.8
373
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
374
 */
375
#define g_try_new0(struct_type, n_structs)    _G_NEW (struct_type, n_structs, try_malloc0)
376
/**
377
 * g_try_renew:
378
 * @struct_type: the type of the elements to allocate
379
 * @mem: the currently allocated memory
380
 * @n_structs: the number of elements to allocate
381
 * 
382
 * Attempts to reallocate the memory pointed to by @mem, so that it now has
383
 * space for @n_structs elements of type @struct_type, and returns %NULL on
384
 * failure. Contrast with g_renew(), which aborts the program on failure.
385
 * It returns the new address of the memory, which may have been moved.
386
 * The function returns %NULL if an overflow occurs.
387
 * 
388
 * Since: 2.8
389
 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
390
 */
391
#define g_try_renew(struct_type, mem, n_structs)  _G_RENEW (struct_type, mem, n_structs, try_realloc)
392
393
394
/* Memory allocation virtualization for debugging purposes
395
 * g_mem_set_vtable() has to be the very first GLib function called
396
 * if being used
397
 */
398
struct _GMemVTable {
399
  gpointer (*malloc)      (gsize    n_bytes);
400
  gpointer (*realloc)     (gpointer mem,
401
         gsize    n_bytes);
402
  void     (*free)        (gpointer mem);
403
  /* optional; set to NULL if not used ! */
404
  gpointer (*calloc)      (gsize    n_blocks,
405
         gsize    n_block_bytes);
406
  gpointer (*try_malloc)  (gsize    n_bytes);
407
  gpointer (*try_realloc) (gpointer mem,
408
         gsize    n_bytes);
409
};
410
GLIB_DEPRECATED_IN_2_46
411
void   g_mem_set_vtable (GMemVTable *vtable);
412
GLIB_DEPRECATED_IN_2_46
413
gboolean g_mem_is_system_malloc (void);
414
415
GLIB_VAR gboolean g_mem_gc_friendly;
416
417
/* Memory profiler and checker, has to be enabled via g_mem_set_vtable()
418
 */
419
GLIB_VAR GMemVTable *glib_mem_profiler_table;
420
GLIB_DEPRECATED_IN_2_46
421
void  g_mem_profile (void);
422
423
G_END_DECLS
424
425
#endif /* __G_MEM_H__ */