Skip to content

Commit

Permalink
Fix an issue that a free memory is accessed
Browse files Browse the repository at this point in the history
In error state, request thread join is not executed. And,
Camera3Device's mId can be accessed from String& after being freed with
CLOGE().

This fix will address by changing reference type to normal variable.

Bug: 268437033
Change-Id: Iad3fcd0fbbaf1e18a2b95093aba08015a933374c
  • Loading branch information
kk48-park authored and thestinger committed Sep 18, 2023
1 parent a89f704 commit 6d7cd80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/camera/libcameraservice/device3/Camera3Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ class Camera3Device :

wp<NotificationListener> mListener;

const String8& mId; // The camera ID
const String8 mId; // The camera ID
int mStatusId; // The RequestThread's component ID for
// status tracking

Expand Down

0 comments on commit 6d7cd80

Please sign in to comment.