Spot the bug in the shared_ptr factory

from Smart pointers
C++23 (GCC 13.3.0) intermediate 4 min 1 issue to find

Find the ownership bug in this factory.

C++
std::pair<std::shared_ptr<Widget>, std::shared_ptr<Widget>> make_views() {
    Widget* raw = new Widget;
    std::shared_ptr<Widget> primary(raw);
    std::shared_ptr<Widget> backup(raw);
    return {primary, backup};
}
Open in playground
Report an error