Commit ff8df1d4 authored by Dimitris Lampridis's avatar Dimitris Lampridis Committed by Dimitris Lampridis

sw: allow wrtd_get_attr_string to return the necessary size even when the buffer itself is NULL

parent ae10cd4d
......@@ -687,7 +687,7 @@ wrtd_status wrtd_get_attr_string(wrtd_dev *wrtd,
status = wrtd_validate_id(wrtd, rep_cap_id, __func__);
WRTD_RETURN_IF_ERROR(status);
if(value == NULL){
if ((value_buffer_size != 0) && (value == NULL)) {
return wrtd_return_error
(wrtd, WRTD_ERROR_NULL_POINTER,
"Null pointer passed for function %s, "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment