shm: initialize buffer data
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Fri, 25 Jan 2013 20:52:25 +0000 (12:52 -0800)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Fri, 25 Jan 2013 20:52:25 +0000 (12:52 -0800)
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
src/core/shm.cpp

index 8be3d53..5268b5a 100644 (file)
@@ -76,6 +76,8 @@ SharedMemoryBuffer::SharedMemoryBuffer(const SharedMemory& shm, int width, int h
        wl_shm_pool_destroy(pool);
        close(fd);
 
+       memset(data_, 0xff, size_);
+
        wl_buffer_set_user_data(*this, this);
 }