mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 17:18:10 +02:00
state-helpers: use shared xmalloc
Just use the shared xmalloc() instead of malloc+assert Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
1f7bdea5c4
commit
0dd1d390be
1 changed files with 2 additions and 3 deletions
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "drm-internal.h"
|
||||
#include "shared/weston-drm-fourcc.h"
|
||||
#include "shared/xalloc.h"
|
||||
|
||||
/**
|
||||
* Allocate a new, empty, plane state.
|
||||
|
|
@ -400,11 +401,9 @@ drm_output_state_duplicate(struct drm_output_state *src,
|
|||
struct drm_pending_state *pending_state,
|
||||
enum drm_output_state_duplicate_mode plane_mode)
|
||||
{
|
||||
struct drm_output_state *dst = malloc(sizeof(*dst));
|
||||
struct drm_output_state *dst = xmalloc(sizeof(*dst));
|
||||
struct drm_plane_state *ps;
|
||||
|
||||
assert(dst);
|
||||
|
||||
/* Copy the whole structure, then individually modify the
|
||||
* pending_state, as well as the list link into our pending
|
||||
* state. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue